Save Geoshape When Map is Hidden

258
1
03-16-2022 01:17 PM
MattFancher1
New Contributor III

Hello. I'm using the survey widget in Experience Builder with a survey I created in Connect. My ExB widget is configured to "send data to this survey" so that when a user clicks a polygon in a map, the selected shape is sent to a geoshape question in the survey.

To complicate things, I added a single choice yes/no question to the survey asking the user if they want to customize the area they selected from the map. If they say 'yes' then I want the map to display in the survey so they can edit the shape. If they say 'no' then I want the map to stay hidden, which is controlled by the  relevancy on the geoshape question (e.g. ${CustomizeArea}='Yes'})

The problem is the polygon shape is not being saved when the record is submitted if the user says 'no' to the CustomizeArea question. Maybe that is exactly how it should work, but I hoped the map would just be hidden, and the geoshape would be submitted anyway.

Apologies if that is convoluted, but hopefully it makes some sense. Any suggestions? The goal, if not clear, is to save the geoshape to the record even when the geoshape question is hidden from the user.

0 Kudos
1 Reply
by Anonymous User
Not applicable

Hi @MattFancher1,

This is expected. When using relevant expressions, if a question is "not relevant", no answer or value is stored and submitted. That is why you are seeing the geoshape map question have no value.

Another option is to use the body::esri:visible column, and use the same expression. This simply hides the question from the UI, but it is still relevant, so defaults, calculations and other values can be applied to the question, even though it is hidden.

https://doc.arcgis.com/en/survey123/desktop/create-surveys/esricustomcolumns.htm#ESRI_SECTION1_7FC91...

Regards,

Phil.

0 Kudos