Henry wrote:
Hi Des, again I appreciate your thorough response and valiant efforts to help me out.
All you laid out sounds great and I had experimented with the same structure before. The issue I ran into was being able to add those double layers of logic for displaying the quantity questions for multiple products. For example, out of four available fruits I select oranges and apples. I could logic link a follow on question asking for the quantity of apples based on - if answer “apples” go to q# asking for quantity. But I couldn’t figure out how to then ask - if (also) “oranges” go to q# asking for quantity of oranges. Basically I couldn’t figure out how to build the logic progression of bullet #5 in your list above. Any chance you could expand on this?
Thank you so much.
@Henry - here’s what the seven other voices in my head put together - based on 3 choices apple, pear and banana:
- I/they (the voices) created a variable for each product called “prod_selected” ie apple_selected, pear_selected, etc. and set each one to “No” initially
- i would also set ‘subtotal’ variables for each product ie apple_countprice, etc. to be able to get subtotals for each of the products..
- on the product selection page (the multiple choice) you evaluate the variables as follows:
- if q1 is ‘apple’ then replace apple_selected with Yes
- if q1 is ‘pear’ then replace pear_selected with Yes
- if q1 is ‘banana’ then replace banana_selected with Yes
- that sets how we will look at the logic jumps - for this case I am going to state that apple and banana have been chose (variables reset to Yes, and pear_selected stays at NO
- next we determine where to go first, creating these logic rules:
- if apple_selected is Yes, then go to q2 (apple input page)
- if apple_selected is No and pear_selected is Yes, then go to q3 (pear input page)
- if apple_selected is No and pear_selected is No and banana_selected is Yes, then go to q4 (banana input page)
- if all are NO, then jump to a Yes/No page that says “you did not select anything to order. If you want to select something, click Yes (send them back to the product selection page q1) or No to jump to an exit page
- in the assumption we have apples yes and bananas yes (i am going make assumption that can wait to the end to calculate subtotals and total price but if you want you can add summary page after the quantity page) :
- on the apple input page for quantity of apples you accept the input into the quantity of apples and then set the following logic rules
- if q-answer is greater than 0, then add q-answer to apple_countprice variable
- if apple_countprice variable is greater than 0, multiply apple_count variable by your_apple_price (this puts the pxq value into the variable)
- if you use a statement page for displaying the apple summary then the next rule can go on that page, if not use it on this one:
- If pear_selected is Yes, then jump to q3 (pear_selected)
- if pear_selected is No and banana_selected is Yes, then jump to q4 (banana_selected)
- if the user had selected pear from the list, they would go to the pear quantity page and you would have to use the evaluation logic there
- if banana_selected is Yes, then jump to q4(banana_selected)
- if banana_selected is No, then jump to overall summary
that evaluation at the end of the quantity input or summary page for a product is the key to determining where to go. that is why i tend to create and use the is_selected type variables for each so that i can make it easy to keep the navigation flowing in a linear fashion as best i can.
hope that helps answer the issue with ‘step 5’
des