I need help with an if/then calculation in a survey used with edit url parameters. The ${STREET} field is already populated and the ${ST_ANSWER} field is a single choice option. The user selects the feature on the map, then chooses their ST_ANSWER from the dropdown menu. If the selection is equal to the STREET already populated for that record, then I want the result to be 1, if not, then 0. The below is one of many I've attempted, but closest to what I thought would work. Any assistance is appreciated! Thanks!
if(selected(${ST_ANSWER}=${STREET}),'1','0')
Solved! Go to Solution.
If it is text can skip the selected part so just this. ( not sure why you want a text based '1' vs 1?)
if${ST_ANSWER}=${STREET},'1','0')
For selected it would be
if(selected(${ST_ANSWER}, ${STREET}),'1','0')
Hope that helps
If it is text can skip the selected part so just this. ( not sure why you want a text based '1' vs 1?)
if${ST_ANSWER}=${STREET},'1','0')
For selected it would be
if(selected(${ST_ANSWER}, ${STREET}),'1','0')
Hope that helps
The first option works perfect! And I removed the quotes - I thought they were needed in the syntax. Thanks for pointing it out. Thank you for your quick help - I appreciate it!