Using the If function, does Survey123 allow the use of a conditional formula that compares two answers?
Here's my formula on the calculation cell:
if((selected(${lst_missionstatus})=${note_default_page}), ${lst_missionstatus}, ${note_default_page})
So if the value of lst_missionstatus and note_default_pge are the same, the value for this question is that of note_default_page, otherwise its value lst_missionstatus.
Survey123 keeps returning with an error that there is only one argument in my condition.
Solved! Go to Solution.
I resolved the issue with this:
if((selected(${lst_missionstatus},${note_default_page})), ${note_default_page}, ${lst_missionstatus})
but it did not do what I wanted to accomplish for my relevant field.
I ended up with this.
if((selected(${lst_missionstatus},'')), ${note_default_page}, ${lst_missionstatus})
The challenge was note_default_page is loaded on form load and the other one is populated with a select, so on form load the question is always null. So I just reversed the logic and now its working.
I resolved the issue with this:
if((selected(${lst_missionstatus},${note_default_page})), ${note_default_page}, ${lst_missionstatus})
but it did not do what I wanted to accomplish for my relevant field.
I ended up with this.
if((selected(${lst_missionstatus},'')), ${note_default_page}, ${lst_missionstatus})
The challenge was note_default_page is loaded on form load and the other one is populated with a select, so on form load the question is always null. So I just reversed the logic and now its working.