I am using a URL in a Field Maps popup link to open a Survey123 form and pass field values from the parent table, populated in Field Maps, to a related table, which is then edited via the Survey123 form. When I use the link in the Map Viewer popup of the Web Map I use for Field Maps, opening the Survey123 form in the Windows Survey123 app, the coded values of the fields are passed to the form. This is the behaviour I would expect and what I want. However, when I use Field Maps on a mobile device, opening the mobile (iOS) Survey123 app, it looks like it is passing the fields' labels rather than the coded values.
I'm happy to provide extra information if need. Thank you!
Solved! Go to Solution.
By default, values can only be passed to select one or select multiple questions from a pop-up in a web map if the name and label of the corresponding choice are identical. If the names and labels in your choice list are different, you can use the DomainCode or UrlEncode functions in an ArcGIS Arcade expression in the pop-up to pass the desired value.
https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm
You need to add an expression to your Web Map layer and then use the expression in place of the field for the custom URL scheme e.g.
expression/expr1:
DomainCode($feature, 'fieldname')
Then update the URL:
arcgis-survey123://?itemID=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&field:targetfield={fieldname}
becomes:
arcgis-survey123://?itemID=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&field:targetfield={expression/expr1}
By default, values can only be passed to select one or select multiple questions from a pop-up in a web map if the name and label of the corresponding choice are identical. If the names and labels in your choice list are different, you can use the DomainCode or UrlEncode functions in an ArcGIS Arcade expression in the pop-up to pass the desired value.
https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm
You need to add an expression to your Web Map layer and then use the expression in place of the field for the custom URL scheme e.g.
expression/expr1:
DomainCode($feature, 'fieldname')
Then update the URL:
arcgis-survey123://?itemID=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&field:targetfield={fieldname}
becomes:
arcgis-survey123://?itemID=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&field:targetfield={expression/expr1}