Hello, everyone!
I have here a select_multiple question type (Activities) and decimal question type (Amount). The requirement is, if the user forgot to select "Shopping" from the Activities question and filled out an amount in the Amount question, that is, if Amount > 0, the "Shopping" choice in the Activities question should automatically be checked.
My XLS form looks like this (Please see Figure 1). This is just a part of a long survey form. The "Shopping" choice is automatically selected if Amount > 0. However, my calculation will automatically clear out all other choices selected by the user in the Activities question and only checks the "Shopping" option (Please see Figure 2).
Figure 1
Figure 2
The requirement is to keep all choices selected by the user in the Activities select multiple question type then if the user forgot to select the "Shopping" option, it will automatically be selected also if the an amount > 0 is entered in the Amount decimal question type. I have also attached my XLS Form for reference.
Thank you in advance for any hint or suggestions.
Hello,
Sorry to say that will not work as currently lain out.
You can get that functionality, but only if no human choices have been made to that select_multiple. The calculates required to get that functionality will not work when another non-calculate choice has been made (which you indicated was a requirement).
But if you are automating that one value, why not just remove it from the larger select_multiple entirely?
I see some options for this scenario:
1) Create a hidden question by concatenating the user's choice in select_multiple Activities + the type of activity for each amount filled in. However, this would be hidden from the user.
2) Another possibility would be to create contraints in Activities, forcing the user to select the shopping option if he/she has filled in the shopping amount (for example). But, for me, having to choose the activity and also the amount is redundant.
3) It would also be possible to display only the amounts to the user and calculate a hidden question by concatenating the activities of the filled amounts.
4) However, in these cases, I always prefer to work with the relevant. In this case, I would only display the shopping amount if he/she had selected the shopping option (for example). For me, it is more practical and avoids possible errors.