I have a question that I need to dynamically change the hint text based on the response to a previous select_one question. If a user selects 'ReIntro_Stocking', I want the hint to be 'What species?'. If they select any of the other 5 choices, I want the hint to be 'Best Description'. This question ${Cons_type} also has a choice_filter based on their selection in ${Cons_Category}
My hint code in connect for question ${Cons_type}: if(${Cons_Category}='ReIntro_Stocking', 'What species?', 'Best Description.')
All it seems to do is create a lightbulb and the same string of text that is in the code with the answer to ${Cons_Category} changing as choices change
Survey123Connect 3.24.31
Solved! Go to Solution.
You have to do your calculation first in a helper field, then you can call that in your hint.
${helperfield} calculation: if(${Cons_Category}='ReIntro_Stocking', 'What species?', 'Best Description.')
${Cons_type} hint: ${helperfield}
I think hints are just text only with no if. Just use a note field instead.
Hints accept ${variables}. Functionality would be if accept if/then statements?
You have to do your calculation first in a helper field, then you can call that in your hint.
${helperfield} calculation: if(${Cons_Category}='ReIntro_Stocking', 'What species?', 'Best Description.')
${Cons_type} hint: ${helperfield}
That worked. Thanks. Kept it null, too so it wouldn't populate in the feature service. But it is weird that seems that the help column should accept If/then statements.