Hi, I am struggling with the below-
I'm wanting a specific value to pop up as default, if a previous text question is answered with a specific text.
For example:
I would like 'Manufacture Company' to field to return the 'nocompany' selection option automatically (without the survey user having to manually select this option), if the value 'NO ITEM ASSOCIATED' is entered into the text field 'Item Code', but otherwise leave blank (for the user to manually select).
So far the syntax examples I've found have been only for return value depending on value from a select_one/select_multiple question, or only for integer-related entries.
Any advice would be greatly appreciated!
Solved! Go to Solution.
Hi @JulietK,
This is possible using an if() statement in the calculation column of the select one. For example, based on your screenshot above:
if(${code}='NO ITEM ASSOCIATED','nocompany','')
This will select the nocompany choice when the exact string in the text field equals NO ITEM ASSOCIATED, but if the string is anything else, the calculation will set the value as null, so then the user can choose any value from the dropdown. Is this what you are after?
Regards,
Phil.
Hi @JulietK,
This is possible using an if() statement in the calculation column of the select one. For example, based on your screenshot above:
if(${code}='NO ITEM ASSOCIATED','nocompany','')
This will select the nocompany choice when the exact string in the text field equals NO ITEM ASSOCIATED, but if the string is anything else, the calculation will set the value as null, so then the user can choose any value from the dropdown. Is this what you are after?
Regards,
Phil.
Hi Philip,
Perfect, thank you so much! Looks like I've been missing the apostrophes in the last section of the syntax 🙂