Hi-
I'm wondering if it's possible to click on a map either from Field Maps or a map in Survey123 that would then prepopulate certain questions? I have done some research and tried this: pulldata("@layer", "getValueAt", "attributes.NEW_MH_ID", "https://services7.arcgis.com/nZUcF2JydS8L5n3y/arcgis/rest/services/FSDMH/FeatureServer/2",${location}) but it's not functioning for me the way I would like. And not sure if this can only be used for polygon layers as the layer I'm wanting is a point layer. I had also tried creating a url that goes into the pop-up so when they click on the manhole it then should take them to survey123, but when I test it out it doesn't open the survey. If someone could tell me what i might be doing wrong that would be great!
Here is the code for the popup url which was generated through GitHub: <a href="arcgis-survey123://?itemID=0f782ed1a0de433b97092951c1038447&field:manhole_id={NEW_MH_ID}&field:manhole_depth={Z}"><img src="https://dabuttonfactory.com/button.png?t=MH+Survey&f=Roboto-Bold&ts=24&tc=fff&tshs=1..." alt="MH Survey"></a>
This page walks you though it
https://doc.arcgis.com/en/survey123/get-started/integratewithotherapps.htm
This one is good too
https://doc.arcgis.com/en/survey123/get-started/integrate-launchfieldapp.htm
This was the document I had originally referred to:
But when I followed these steps and click the link in the pop up I get an untitled/about blank web page. Nothing opens up. This was the original URL:
"arcgis-survey123://?itemID=0f782ed1a0de433b97092951c1038447&field:manhole_id={NEW_MH_ID}&field:manhole_depth={Z}" before I found this blog:
The documents you sent me pretty much state similar things and this where I'm struggling getting it to actually function as these documents state.
Are you wanting a web browser or app to open? Is this on a tablet or windows? Opening the windows app does not usually work but someone posted it recently they got it to go.
Well I'm building this out on a web browser but in the end it will be used on an ipad.
So it did work on the ipad except the questions that i wanted pre populated didn't fill in.... i'll keep playing with this i guess.
I can't tell if you text is being changed in the window here adding the amp; stuff but you may be missing the :
Should look like arcgis-survey123://?itemID=b02fc3613d344ee1&field:PointID={PointID}
Ok the arcgis-survey123://? part says launch an app so its not going to work in Windows. To open web browser it has to start with the http way (https://survey123.arcgis.app). Best thing is to test on a tablet really. Otherwise change to the http to test but it does not tell you as much. Basically you are telling windows to launch an app you don't have. I know the directions sound like it may work but it does not. You can try getting the windows app but I have had no luck with that. (note NOT connect but just the 123 app for windows).
Hope that makes sense
it did have those "amp;" in them. I did remove them but still not prepopulating those questions in survey123. I am using survey123 connect to make any edits to the survery. Yeah i did see that it said for app, so i am now testing it through the ipad.
This is what it calls out in the pop up: arcgis-survey123://?itemID=0f782ed1a0de433b97092951c1038447&field:manhole_id={NEW_MH_ID}&field:manhole_depth={Z}
When i select a MH in field maps this url does replace the {PointID}s with the associated attributes, but when i click it and it takes me to the survey it does not show them in questions i called out. Maybe I have the type or something set incorrectly in the form that's preventing this? (I'm still pretty green to building surveys)
| type | name | label | hint | guidance_hint | appearance | required | required_message | readonly | default | calculation | constraint | constraint_message | relevant | choice_filter | repeat_count | media::audio | media::image | bind::type | bind::esri:fieldType | bind::esri:fieldLength | bind::esri:fieldAlias | body::esri:style | bind::esri:parameters | parameters | body::accept | body::esri:visible | body::esri:inputMask | label::language (xy) | hint::language (xy) | guidance_hint::language (xy) | required_message::language (xy) | constraint_message::language (xy) | media::audio::language (xy) | media::image::language (xy) | body::accuracyThreshold | bind::esri:warning | bind::esri:warning_message | bind::saveIncomplete | bind::esri:workflow |
| text | manhole_id | Manhole ID | autocomplete | yes | |||||||||||||||||||||||||||||||||||
| integer | manhole_depth | Manhole Depth | in feet |
Not sure what this means? in field maps this url does replace the {PointID}s with the associated attributes,
are any of the fields arcade expressions or anything like that? I have not tried to access a Z value before is that a real field that has values?
This looks correct to me on the formatting. When it fails it tends to be the wrong type, or too long for the field, or trying to pass into a repeat which you cannot do.