# Conditions based on the total score of previous questions

**URL:** https://community.feathery.io/t/conditions-based-on-the-total-score-of-previous-questions/339
**Category:** Support
**Created:** [December 15, 2023, 5:02pm UTC](https://community.feathery.io/t/conditions-based-on-the-total-score-of-previous-questions/339 "2023-12-15T17:02:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![WilsonAthena](https://avatars.discourse-cdn.com/v4/letter/w/f17d59/32.png) [@WilsonAthena](https://community.feathery.io/u/WilsonAthena)
#### Post date: [December 15, 2023, 5:02pm UTC](https://community.feathery.io/t/conditions-based-on-the-total-score-of-previous-questions/339/1 "2023-12-15T17:02:35Z")

</div>

Hi,

We have 10+ questions that are a mix of:

- Score: 1-10
- Multiple Choice: Pending the choice they do, they get a different score

I want to have it so the path is then conditional of the total score. How do i do this?

My current understanding is there’s two key pieces to figure out:

i) where do the scores get stored

ii) how can i then “total them up” to determine which conditional path the user to take based on the total score

---

<div class="post-metadata">

### Author: ![peter](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/peter/32/7_2.png) [@peter](https://community.feathery.io/u/peter)
#### Post date: [December 15, 2023, 6:13pm UTC](https://community.feathery.io/t/conditions-based-on-the-total-score-of-previous-questions/339/2 "2023-12-15T18:13:52Z")

</div>

You can create a rule that runs when any of the multiple choice fields are selected. You can store the score into a hidden field you create, and you can total them up via logic as well since you can get the value of each field there

---

<div class="post-metadata">

### Author: ![WilsonAthena](https://avatars.discourse-cdn.com/v4/letter/w/f17d59/32.png) [@WilsonAthena](https://community.feathery.io/u/WilsonAthena)
#### Post date: [December 15, 2023, 6:26pm UTC](https://community.feathery.io/t/conditions-based-on-the-total-score-of-previous-questions/339/3 "2023-12-15T18:26:04Z")

</div>

Hi Peter,

Thanks for the reply. Can you confirm if my below action steps are accurate based on your feedback? The more specific or step-by-step you can provide, the better.

Step 1: I go into the “Logic” section, Create a “Rule” based on when multiple choice fields are selected

Step 2: I create a hidden field. Is it accurate to say I’ll need a hidden field for every single question and have this connected to whatever the button was selected?

I’m confused as to if this is the right setup? Imagine a question that has a score option from 1 to 10. When it’s selected, how do I store the value? Below is a screenshot

 ![CleanShot 2023-12-15 at 14.14.02](https://canada1.discourse-cdn.com/flex030/uploads/feathery/original/1X/f2462c78b96e6799573413aceba73dca7345c4a6.png)

Step 3: How do I “total them up via logic” ?

---

<div class="post-metadata">

### Author: ![WilsonAthena](https://avatars.discourse-cdn.com/v4/letter/w/f17d59/32.png) [@WilsonAthena](https://community.feathery.io/u/WilsonAthena)
#### Post date: [December 15, 2023, 8:24pm UTC](https://community.feathery.io/t/conditions-based-on-the-total-score-of-previous-questions/339/4 "2023-12-15T20:24:03Z")

</div>

To sum up the totals, would this be the right code to use?

// Assuming ‘feathery.fields’ is a dictionary-like object that stores field values.  
// Summing up the ‘Quiz Q1 Result’ and ‘Quiz Q2 Result’ and storing in ‘contact\_delegationquiz\_score’  
feathery.fields[‘contact\_delegationquiz\_score’] = feathery.fields[‘Quiz Q1 Result’].value + feathery.fields[‘Quiz Q2 Result’].value;

Specifically, the fields “Quiz Q1 Result” and “Quiz Q2” Result are the total scores.

I then createa. new hidden field called “contact\_delegationquiz\_score” which is the sum of the quiz results.

---

<div class="post-metadata">

### Author: ![peter](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/peter/32/7_2.png) [@peter](https://community.feathery.io/u/peter)
#### Post date: [December 15, 2023, 8:25pm UTC](https://community.feathery.io/t/conditions-based-on-the-total-score-of-previous-questions/339/5 "2023-12-15T20:25:05Z")

</div>

set the .value property. so:

feathery.fields[‘contact\_delegationquiz\_score’].value = feathery.fields[‘Quiz Q1 Result’].value + feathery.fields[‘Quiz Q2 Result’].value;

---

<div class="post-metadata">

### Author: ![WilsonAthena](https://avatars.discourse-cdn.com/v4/letter/w/f17d59/32.png) [@WilsonAthena](https://community.feathery.io/u/WilsonAthena)
#### Post date: [December 15, 2023, 9:26pm UTC](https://community.feathery.io/t/conditions-based-on-the-total-score-of-previous-questions/339/6 "2023-12-15T21:26:25Z")

</div>

Is there a more efficient way within the rule builder to build the scores?

What I want from a question with a scale from 1-10

- If they answer 1 to 5, the score is 0
- If answer 6, the score is 1
- If answer 7, the score is 2,
- IF answer 8, the socre is 3
- If ansewr 9, the score is 4
- If answer 10, the score is 5.

Below is a \<1 minute loom of wha ti have: [Loom | Free Screen & Video Recording Software | Loom](https://www.loom.com/share/8385fd9ef0b4419eaafbdf1f3101195d)

---

<div class="post-metadata">

### Author: ![megloney](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@megloney](https://community.feathery.io/u/megloney)
#### Post date: [August 19, 2024, 4:46pm UTC](https://community.feathery.io/t/conditions-based-on-the-total-score-of-previous-questions/339/7 "2024-08-19T16:46:50Z")

</div>

@WilsonAthena or @peter Did you ever figure this out? I am trying to do something similar where in a single step we ask a series of questions, and based on the answers to those questions we move them to 1 of 2 next steps. EX:

1. Do you like the color green? Radio buttons for Yes, No, I don’t know (where yes = 1, No = 0 and I don’t know = 1)
2. Do you like the color red? Radio buttons for Yes, No, I don’t know (where yes = 1, No = 0 and I don’t know = 1)
3. Do you like the color blue? Radio buttons for Yes, No, I don’t know (where yes = 1, No = 0 and I don’t know = 1)

Then if the total score of those questions is \>1, go to next step, if the total is 0, go to off-ramp message screen.

It doesn’t seem like I can create this logic just in the form flow conditions, so was thinking I could do it this way.
