Select to view content in your preferred language

Autoselect a value if user has an input in a certain question

546
4
03-14-2024 08:09 PM
AngelNicoleAlvaro1
Occasional Contributor

Hi!

I am working on a survey wherein the form will automatically tick a value in the select multiple question if he/she has an answer in a certain question.

For specifics, if the user has an input in the Shopping Amount, that will automatically select Shopping as other activity in a select_multiple question.  

AngelNicoleAlvaro1_0-1710471938583.png

AngelNicoleAlvaro1_1-1710471988225.png

Client also wants that the Shopping Amount be required if user has selected Shopping in either one of the two questions above - that one I figured that out, but the other requirement is still unsolved.

Is there any way to do this? Any help would be appreciated. Thank you in advance.

0 Kudos
4 Replies
abureaux
MVP Frequent Contributor

The problem is that your select_multiple isn't read only. As soon as a user makes a selection, the calculates will either stop working, or override the user selection (depends on you calculateMode). Neither of these scenarios are good though.

But, to do what you want:

abureaux_0-1710516426897.png

abureaux_1-1710516437018.png

abureaux_2-1710516443499.png

 

But, as I mention above, here is the issue. As soon as the user makes a selection, you get a "refresh" icon:

abureaux_3-1710516480792.png

This indicates that the calculates are no longer going to work... or, you can set calculationMode=always and the user's selection will be over-ridden.

The only real way to do this is to have the select_multiple be Read Only.

0 Kudos
AngelNicoleAlvaro1
Occasional Contributor

Hi, abureaux! The select_multiple question cannot be a set to read only because the users need to select all other activities done in the area.

I am trying to formulate a workaround for this process by using concatenate to get the values from the select_multiple above to add with the Shopping concat only, but those that are not selected are returning a value of 0. Do you know how to remove the other zeroes?

AngelNicoleAlvaro1_0-1710753814451.png

 

0 Kudos
abureaux
MVP Frequent Contributor

I'm not sure where those '0' would be coming from off-hand. I'd have to see the XLSX.

Regarding the list, you have two options now:

  • Drop the automation. As I mentioned, as soon as the user makes a selection, the calculate will stop working.
  • Add a hidden list. You can use my suggestion above, but this time apply the calculate to a hidden list. Then, you can concatenate the formula I showed with the visible select_multiple that the user interacts with into one, and then use that to select items from the hidden select_multiple.
0 Kudos
AngelNicoleAlvaro1
Occasional Contributor

Hi, abureaux! I've attached the .xlsx form of our survey so you could see the calculation. I appreciate you for taking the time to help us.

0 Kudos