I am trying to auto-populate a select_one type (place) list by using if statement in calculate field based on geopoint location in geofence with data attributes successfully extracted from the polygon using Survey123 Connect. I am using the following conditions in an if statement within calculation column for select_one to try to auto-populate a selection based on locationID attribute but it has been unsuccessful thus far. I have attached a snips of select_one place calculation and place choice list from the spreadsheet. Please let me know what I am missing, Thanks!
Solved! Go to Solution.
I think you need to make a slight update to the if statements. Assuming the values fs1, fs2, and tw1 are text, they should have quotes so that they are not read as variables. I think it should be something like the following:
if(${locationID}='FS1','fs1',if(${locationID}='FS2','fs2',if(${locationID}='TW1','tw1','')))
I think you need to make a slight update to the if statements. Assuming the values fs1, fs2, and tw1 are text, they should have quotes so that they are not read as variables. I think it should be something like the following:
if(${locationID}='FS1','fs1',if(${locationID}='FS2','fs2',if(${locationID}='TW1','tw1','')))
Yes values are text and I did miss adding quotes, thank you for catching it and for your assistance!