Here is what I am trying to do. The quiz I am writing tallies up points in three categories. Based on the user’s answers, they can either be categorized into one of these three categories, or be categorized into one category as a primary and another category as the secondary. The quiz tallies up three category variables and then converts them into a percentage of total at the end.

Here is the logic:

Category 1 >= 75%: Category 1 ending page:

Category 2 >= 75%: Category 2 ending page:

Category 3 >= 75%: Category 3 ending page:

All categories < 75%, Category 1 is largest, and Category 2 > Category 3: Category 1-2 Landing page

All categories < 75%, Category 1 is largest, and Category 3 > Category 2: Category 1-3 Landing page

All categories < 75%, Category 2 is largest, and Category 1 > Category 3: Category 2-1 Landing page

All categories < 75%, Category 2 is largest, and Category 3 > Category 1: Category 2-3 Landing page

All categories < 75%, Category 3 is largest, and Category 2 > Category 1: Category 3-2 Landing page

All categories < 75%, Category 3 is largest, and Category 1 > Category 2: Category 3-1 Landing page

In order to do this, I need to be able to store a result of aa operation on 2 variables into a 3rd.

Does anyone know how to do that?

**Best answer by john.desborough**

here is quick summary -

- create variables as follows:
- v_vata numeric default to 0
- v_pitta numeric default to 0
- v_kapha numveri default to 0
- v_vata_gt_pitta numeric default 0
- v_vata_gt_kapha numeric default 0
- v_pitta_gt_kapha numeric default 0
- v_vatta_bigger_pitta text default no
- v_vatta_bigger_kapha text default no
- v_pitta_bigger_kapha text default no

- logic goes like this:
- if v_vatta is gt 0 then add v_vatta to v_vatta_gt_pitta
- if v_pitta is gt 0 then subtract v_pitta from v_vatta_gt_pitta
- if v_vatta_gt_pitta is greater than 0 replace v_vatta_bigger_pitta with yes
- if v_vatta is gt 0 then add v_vatta to v_vatta_gt_kapha
- if v_kapha is gt 0 then subtract v_kapha from v_vatta_gt_kapha
- if v_vatta_gt_kapha is greater than 0 replace v_vatta_bigger_kapha with yes
- ..
- if v_vatta_bigger_pitta is yes AND v_vatta_bigger_kapha is yes THEN jumpto ending page for vatta

you would need to look at the combinations and determine your path based on this style of logic. what i showed does not account for ties.

des