Select to view content in your preferred language

Dynamic Hints

82
4
Jump to solution
Wednesday
AmyAlford1
Occasional Contributor

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

AmyAlford1_0-1767814263017.png

 

Survey123Connect 3.24.31

0 Kudos
1 Solution

Accepted Solutions
Neal_t_k
MVP Regular Contributor

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}

View solution in original post

4 Replies
DougBrowning
MVP Esteemed Contributor

I think hints are just text only with no if.  Just use a note field instead.

0 Kudos
AmyAlford1
Occasional Contributor

Hints accept ${variables}. Functionality would be if accept if/then statements?

0 Kudos
Neal_t_k
MVP Regular Contributor

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}

AmyAlford1
Occasional Contributor

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.

0 Kudos