Hello: Relatively new Survey123 Connect User here. First I want to say Thank You to this very helpful community. You have answered so many questions for me already. Hooray for bind::esri:fieldAlias, this saved me lots of frustration! 🙂
I am recreating an existing form for wildlife survey data collection. We have a long term dataset and need to update the tech on the collection end.
I have read many posts on how to populate a field based on the answer to a previous field and have tried several things. What I want to do seems pretty simple, but I am not figuring it out.
Basically the question is, did the animal you observe have marks (ear tags, radio collar)? If the answer to field 'Marks' is None, I want to populate the following fields, left ear color, left ear shape, etc with None.
See the screen shot of what I have tried in the Relevant column. I also put this expression in the calculation field. But thus far, no luck.
Am I on the right track?
Thank You
Solved! Go to Solution.
Hi, I think this should work for you. It needs to be in the calculation column, not the relevant column.
if(${Marks} = 'None', 'None', '')
When using if statements, you need to provide the else condition as well (the third argument). In this case, it's just empty quotes so nothing happens if ${Marks} isn't 'None'.
Also, keep in mind that your expression needs to use the name of the choice, not the label.
Hi Katherine:
That worked, I moved to calculations column and removed any extraneous spaces.
Thanks so much!
Hi, I think this should work for you. It needs to be in the calculation column, not the relevant column.
if(${Marks} = 'None', 'None', '')
When using if statements, you need to provide the else condition as well (the third argument). In this case, it's just empty quotes so nothing happens if ${Marks} isn't 'None'.
Also, keep in mind that your expression needs to use the name of the choice, not the label.
Hi Katherine:
That worked, I moved to calculations column and removed any extraneous spaces.
Thanks so much!