Set condition based on value not label | XM Community
Skip to main content

Hello,

 

I currently have a conditional script that checks if “Yes” was selected at QID1. Could anyone advise how to rewrite the script to instead check for the value of ‘1’ (where 1=Yes)?

i.e. change...

if ("${q://QID1/ChoiceGroup/SelectedChoices}" === "Yes") 

to something like...

if ("${q://QID1/ChoiceGroup/SelectedValue}" === ‘1’) 

 

Just don’t know what the right reference would be.

Thanks

Hello @cgillon

You can utilize the 'Selected Choice Recode' feature here. It will be represented by a code similar to this: '${q://QID2/SelectedChoicesRecode}'.

 

Let me know if this helps.


That works great.

Thanks for the assistance.


Leave a Reply