Select to view content in your preferred language

How to prevent Survey123 form from creating a spatial point when the geopoint question is not relevant

273
4
03-12-2025 04:45 PM
WilderNiss1
Occasional Contributor

I have designed a survey with a geopoint question within a repeat. I would like my survey data to only generate a spatial data point when that repeat is relevant. For more context, the survey is being used to survey birds, and the repeat is used to collect data on nests, in case one is found during the survey. I want the data to include a spatial point for each nest found in a survey, but if no nests are found - I don't want there to be any spatial points in the survey results. 

Right now, the survey started generating a 0 Lat, 0 Long point even when the nest repeat is not relevant . I have that repeat set to appear only if the answer to the question "Did you find a new nest?" is yes. Yet even when users are answering no, the spatial point from within the repeat is being defaulted to 0 lat, 0 long. 

I have the survey set up to create a null geopoint earlier in the survey, because I understand this is a requirement of Survey123. Is there a new way around this? That used to work and now it isn't working anymore. Thanks! 

0 Kudos
4 Replies
LaurenceTait
Frequent Contributor

Survey123 requires a geopoint. If you don't include one, it will make one for you anyway.

I'm not sure what you mean by a null geopoint. If you set the bind to null, the geopoint won't be created, and Survey123 will create another one for you. It's been that way for at least 5 years.

What is the problem with having an empty geopoint field in your database?

It's unusual not to want to store locations for 'failed' searches. Normally you would want to be able to see where you searched and found nothing, particularly when can be done at zero effort.

 

0 Kudos
WilderNiss1
Occasional Contributor

@LaurenceTait - I was taught that it was possible to avoid having Survey123 put a point on your data map using the null geopoint, and this has been working for me. I recognize that it may be helpful to know where "failed" searches occurred for some situations, but we survey the same sites and I want only nest occurrences to appear on the map. The geopoints I'm collecting come from within a repeat in our survey. The geopoint question is a relevant question, but sometimes it will end up being filled in even when that question is not relevant. 

I can go into the data on the backend and delete that response, and then it doesn't show up on the map. But when others submit the data, it will show up. I'll attach a screen shot of the response area for that section in my survey so you can see what I mean. 

WilderNiss1_0-1742848524766.png

What I'm hearing though, is that in your experience this is always the way it's been. But in my experience there was a workaround that is no longer working and I'm curious if anyone else had a situation like mine where they didn't want a spatial point to show up unless it was relevant (e.g. "Did you find a new nest = yes"). 

0 Kudos
LaurenceTait
Frequent Contributor

If you do not include a geopoint, geotrace, or geoshape question in Survey123 Connect, the main feature layer for your survey will have a geometry type of esriGeometryPoint. The point location is populated with the location information available from the device at the time the survey was opened.

This behavior applies even if the survey has repeats that contain map questions but doesn't include a map question outside of the repeats.

If you do not include a map question in the Survey123 web designer, the main feature layer for your survey will have a geometry type of esriGeometryPoint. The point location for each survey response will use the default of 0,0.

...............................

 

It's been that way for at least 5 years. There may have been a brief period where the geometry point wasn't required, but I must have missed it.

0 Kudos
WilderNiss1
Occasional Contributor

@LaurenceTait thanks for breaking this down for me. (Side note - I don't seem to be getting notified of these responses, any tips on how to fix that?) 

I recognize what you're talking about, but I had previously found a workaround to this idea using the basic set up in this example survey. I'd encourage you to try publishing this to see what I mean. In this survey, there is a null geopoint question outside of the repeat, and a geopoint question within the repeat. When you publish this survey - the related table (repeat) is actually the feature layer, and the large survey is just a table (can be seen in the schema of the survey). 

 

Importantly, if you publish this survey and submit a response that does not involve a nest (so the geopoint question within the repeat isn't relevant) then no points will show up in the map on the data section of the Survey123 management page. This is exactly what I am trying to do. And I was doing it for quite a long time with no issues. The only points that would get added to the map were geopoints from within the repeat, when that section was relevant (i.e. a nest was found). However now I'm having issues with my survey (all of a sudden) where this process has stopped working. I tried this test in the following sequence: 
- One survey where "no nests" (no geopoint) 

- One survey with a nest (geopoint) 

- Another survey with "no nests" - (no additional geopoint). 

So it works, I just can't figure out why the process broke down on me all of a sudden. Thanks!

0 Kudos