Stop survey if geopoint in specific location

436
3
Jump to solution
04-08-2022 08:37 AM
MelissaGearman
New Contributor II

I work for a county and am creating a survey that will serve as a permit application. One township within the county has their own permitting system so I want to be able to stop the permit application if the applicant selects a location within this township. Essentially what I want is a condition that is triggered when the geopoint is in a specific location. Is this, or a workaround to this, possible?

0 Kudos
2 Solutions

Accepted Solutions
GeoJosh
Esri Regular Contributor

Hi Melissa. I did some testing in S123 Connect and this is what I came up with.

GeoJosh_0-1649437207173.png

If the point's x value is greater than 0, the group of questions will be "relevant" and show for the user. If it is less than 0, it is not relevant and will be hidden. You should be able to adjust and add on to this format to mimic a bounding box of the area of interest.

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm

https://doc.arcgis.com/en/survey123/desktop/create-surveys/geopoints.htm

 

View solution in original post

0 Kudos
MelissaGearman
New Contributor II

Thanks for the guidance. I took what you suggested and worked it to fit with what I needed. What I ended up doing was using the constraint and constraint_message fields. Using pulldata("@geopoint", ${location}, "x") and pulldata("@geopoint", ${location}, "y"), I was able created a bounding box of the area so that when someone places a geopoint within the area it will give an error message. It took a little while troubleshooting with the coordinates and the <> and connectors (and/or) to get it right but it seems to be  working now

View solution in original post

0 Kudos
3 Replies
GeoJosh
Esri Regular Contributor

Hi Melissa. I did some testing in S123 Connect and this is what I came up with.

GeoJosh_0-1649437207173.png

If the point's x value is greater than 0, the group of questions will be "relevant" and show for the user. If it is less than 0, it is not relevant and will be hidden. You should be able to adjust and add on to this format to mimic a bounding box of the area of interest.

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm

https://doc.arcgis.com/en/survey123/desktop/create-surveys/geopoints.htm

 

0 Kudos
MelissaGearman
New Contributor II

Thanks for the guidance. I took what you suggested and worked it to fit with what I needed. What I ended up doing was using the constraint and constraint_message fields. Using pulldata("@geopoint", ${location}, "x") and pulldata("@geopoint", ${location}, "y"), I was able created a bounding box of the area so that when someone places a geopoint within the area it will give an error message. It took a little while troubleshooting with the coordinates and the <> and connectors (and/or) to get it right but it seems to be  working now

0 Kudos
IsmaelChivite
Esri Notable Contributor

You could also try the pulldata("@layer","getRecordAt") function. It is still in Beta, but you may want to explore it. Check details here: https://community.esri.com/t5/arcgis-survey123-blog/survey123-april-2022-now-available-in-beta/ba-p/...   This function works only in the Survey123 web app and requires you to use the latest version of Survey123 Connect to publish your form. Essentially, you can query a layer with the boundary of your city using the provided location. If you get a record back, you let them submit. Otherwise you show an error message.

Please note that as of April 2022 this function is in Beta. However, you can start testing it and providing feedback.