Hi everyone,
I'm currently working with ArcGIS Experience Builder, using the Survey widget to submit and edit records via a Survey123 form. My goal is to display different groups of questions depending on the workflow context — One page for entering basic property information, and another page to complete additional details.
I know that in Survey123, it's possible to use relevant logic based on hidden fields and URL parameters (?step=1, ?step=2). This works well when embedding the survey with the Embed widget. But for other funcionalities i need to use the Survey widget.
Is there any way to pass URL parameters when using the Survey widget in Experience Builder?
Any suggestions or workarounds would be appreciated. Thanks in advance!
Hi @JuanTomásMartinez17 ,
It is not possible to pass URL parameters to the survey in the Survey widget currently. Would you mind sharing more details of your workflow to help us understand the potential enhancement to the Survey widget? For example, what settings you need in the Survey widget in additional to passing URL parameters?
I have this same need as @JuanTomásMartinez17 . I need to pass values into a survey from an external WorkOrder system. Using the embed widget I can have ExBuilder recognise customer URL parameters and pass those into the survey as shown below:
https://survey123.arcgis.com/share/bxxxxxx9?portalUrl=https://myportal.org/portal&field:ADDRESS_NUMB...}&field:WORKORDER_NUMBER={appURL.search.WO}
However, the problem with doing this is that certain calc's within the survey don't fire when using the embed widget versus the native Survey123 widget. For example, the address is passed to a Geocoder and the XY pulled to center a GeoPoint within the survey. This works great when the survey is accessed via a browser. However, it fails to fire when using the embed widget within ExBuilder. If I were able to have the Survey123 widget within ExBuilder recognize external values passed in via URL Parameters (as shown above) it would solve this issue.
The idea behind the workflow was to create a survey that would be used in two different stages of resource management. In each stage, I wanted to display only the necessary fields.
The approach I pursued was to use the relevant expression in Survey123 Connect, based on a field called step. Then, using the URL, I could pass a value to that field, and depending on the value, certain fields would appear while others would remain hidden. (Using default values wasn’t a viable option because that field is ignored in edit mode.)
It might be useful to have a Launch Parameters section in the Survey widget.
I eventually solved it by creating a “master” survey that contains all the fields, and then two additional surveys that point to the same feature service, each showing only the relevant fields for its stage. The goal was to avoid this approach in order not to maintain three separate surveys.