Score limit to 100, other questions N/A

488
2
Jump to solution
02-07-2022 01:57 PM
djcrouse
New Contributor II

I am making a survey that scores the answers. When the score hits 100, I need the questions that follow to be N/A.  I would also like to have a running score that adds the subtotals along the way (I have a total at the end). I am using Connect, the latest version.  I tried various version of "or" statements for the ones that automatically go to 100 and couldn't get it. 

Thanks!

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi @djcrouse,

I had a look at your survey xlsx file and yes this should be possible. You need to add some additional hidden fields to do all the subtotals after the select one questions are filled in, so that after each question you have a running subtotal. Then after the next select one question add the value from that one to the previous subtotal. You can use the hidden question type or hidden appearance with null fieldType, depending on if you want the values to be stored in feature layer.

Based on the subtotal you can then set the value of the following select one question to 'na' using an if() statement in calculation column. Similar to:

if(${subtotal1}>=100,'na','')

For the select one questions, do you always want the 'na' stored in feature layer, or would you prefer the question to be hidden and no answer submitted at all for that question, in that case you can use a relevant statement based on the subtotal also (similar expression as above).

If you want all the answers submitted including 'na', but do not want the user to see the question, you can use the if() statement in the bind::esri:visible column also, instead of just using hidden appearance.

Hope this helps.

Regards,

Phil.

View solution in original post

0 Kudos
2 Replies
by Anonymous User
Not applicable

Hi @djcrouse,

I had a look at your survey xlsx file and yes this should be possible. You need to add some additional hidden fields to do all the subtotals after the select one questions are filled in, so that after each question you have a running subtotal. Then after the next select one question add the value from that one to the previous subtotal. You can use the hidden question type or hidden appearance with null fieldType, depending on if you want the values to be stored in feature layer.

Based on the subtotal you can then set the value of the following select one question to 'na' using an if() statement in calculation column. Similar to:

if(${subtotal1}>=100,'na','')

For the select one questions, do you always want the 'na' stored in feature layer, or would you prefer the question to be hidden and no answer submitted at all for that question, in that case you can use a relevant statement based on the subtotal also (similar expression as above).

If you want all the answers submitted including 'na', but do not want the user to see the question, you can use the if() statement in the bind::esri:visible column also, instead of just using hidden appearance.

Hope this helps.

Regards,

Phil.

0 Kudos
djcrouse
New Contributor II

Thanks! That worked.