Select to view content in your preferred language

If statement syntax for Survey123 Report template

135
2
a week ago
AdamGebhart
Frequent Contributor

Can someone give me the correct syntax for this?  

I have a field {owner_city} that contains a city or township name.  It is populated following the user selecting an address or location via geopoint, then a pulldata function hits a polygon layer in one of our map services to get said city or township name.  (We need the political jurisdiction instead of the zip code city).  This field may also be blank if the user doesn't know or locate an address in the geopoint step.

In my report I would like to have a line displayed that completes the following:

If {owner_city} is populated (i.e. the pulldata function returns a value) return... "This address is located within {owner_city}."  If {owner_city} is not populated return "This address is outside of the county or was not provided by the user."

I've tried a handful of conditional statements and I'm not getting the correct syntax for importing the Word doc.

0 Kudos
2 Replies
Neal_t_k
Frequent Contributor

A couple to try:

${if owner_city}This address is located within {owner_city}.${/}

${if  not owner_city}This address is outside of the county or was not provided by the user.${/}

or

${if owner_city !=''}This address is located within {owner_city}.${/}

${if  not owner_city==''}This address is outside of the county or was not provided by the user.${/}

 

https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereport-conditionalelements.htm

 

 

AdamGebhart
Frequent Contributor

@Neal_t_k 

Sorry for the delayed response and thank you for your response.  I ended up taking things in a different direction so my original post wasn't needed.  Hopefully your response may help someone else down the road though.  Thanks again.

0 Kudos