Select to view content in your preferred language

Survey 123 PullData function from another feature layer triggered on record/asset selection on web map

343
4
Jump to solution
05-31-2024 12:10 PM
Boomer87
New Contributor II

Hi folks,

Question for the community in terms of utilizing the PullData function in Survey 123.

I am working on a project where there is an existing feature layer in our enterprise environment with Street Furniture assets.

The business wants us to create a Survey123 form for condition assessment of these Street Furniture assets. 

The workflow is for us to create web application whereby the Street Furniture feature layer is added to the web map, and when a user/editor clicks on the specific Street Furniture point on the map, a pop up is generated with the link to the Survey123 Form along with other attributes. Then within the Survey 123 Form, they would like the Asset ID of the specific Street Furniture asset they clicked on to be autopopulated in the Asset ID section of the Survey 123 form.

Boomer87_0-1717182505974.png

 

I know that we could use the PullData function to populate the Asset ID section of this feature layer, but is there a way to trigger the PullData function on the specific Street Furniture point that the user selects in the web map? Would that be through an attribute rule or is there a way to write that into the PullData function?

pulldata("@layer", "getValue", "attributes.FIELD_IN_FEATURE_LAYER", 'EXACT_REST_URL_HERE,concat("CODE_FIELD= '", ${YOUR_SURVEY123_FIELD}, "'"))

Thanks so much

 

0 Kudos
2 Solutions

Accepted Solutions
Boomer87
New Contributor II

Thanks so much for the tip @ChristopherCounsell ! The only thing is, our Survey123 survey isn't hosted on AGOL - rather our internal portal Enterprise environment so the syntax of our URL looks a bit different with an added portion for the portal URL. However, when trying the different variations of the below, I can't access the actual survey when attempting to go to the URL if that makes sense.

For example:

https://survey123.arcgis.com/share/c252e0d8a42c48a29efe623a0db17777?portalUrl=https://organization.c...

or

https://survey123.arcgis.com/share/c252e0d8a42c48a29efe623a0db17777?field:AssetID={ASSETID}?portalUr...

The asset id does generate as expected within the string above though, when tested in a webmap which is great. Just unsure of how the syntax differs when the Survey is hosted in a Portal environment

whereas I am still able to navigate to the URL and access the survey when I don't have the added clauses.

https://survey123.arcgis.com/share/c252e0d8a42c48a29efe623a0db17777?portalUrl=https://organization.c...

View solution in original post

0 Kudos
abureaux
MVP Regular Contributor

...our Survey123 ... Enterprise environment

That is fine. Nothing really changes.

...the syntax of our URL looks a bit different with an added portion for the portal URL.

That added portion isn't strictly necessary. I don't use that in my URLs because the Field Apps I have employees using are already configured. That is to say, this component of the URL is optional.

unsure of how the syntax differs when the Survey is hosted in a Portal environment

It doesn't. This works in AGO and Enterprise environments.

You are also not bound to the Survey Site's new (and super annoying) URL format. You can still use the old URL format that opens S123 automatically. E.g., This is (basically) the URL I use for launching into S123 from webmaps in my Enterprise environment. Take notice of 1) no Portal reference, and 2) I am using the old (and better, IMO) URL (there is nothing wrong with going with the new URL though. I just find that extra step a waste of time).

arcgis-survey123://?itemID=44455566677788899911122233444&field:gn_pn={wbs1}&field:gn_phase={wbs2}&field:gn_client={ClName}

View solution in original post

4 Replies
ChristopherCounsell
MVP Regular Contributor

Then within the Survey 123 Form, they would like the Asset ID of the specific Street Furniture asset they clicked on to be autopopulated in the Asset ID section of the Survey 123 form.

You can pass values from the pop-up to the survey using Survey123's custom URL scheme

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-web-form-url/ba-p/...

https://survey123.arcgis.com/share/7fdcf75abfad4ae29f0156e161740d27?field:AssetID={MapAssetID}

abureaux
MVP Regular Contributor

Exactly as @ChristopherCounsell stated. That is how you pass Feature Layer properties to S123.

I just wanted to add that, since it sounds like this is a heavily web map focused project, there is a "Survey123 widget" in Experience Builder that works very well. Rather than launch into a separate S123 window, why not just user the Experience Builder widget? You can pass properties directly from EB into S123 and keep everything in the same window. May be a better user experience in your case.

Boomer87
New Contributor II

Thanks so much for the tip @ChristopherCounsell ! The only thing is, our Survey123 survey isn't hosted on AGOL - rather our internal portal Enterprise environment so the syntax of our URL looks a bit different with an added portion for the portal URL. However, when trying the different variations of the below, I can't access the actual survey when attempting to go to the URL if that makes sense.

For example:

https://survey123.arcgis.com/share/c252e0d8a42c48a29efe623a0db17777?portalUrl=https://organization.c...

or

https://survey123.arcgis.com/share/c252e0d8a42c48a29efe623a0db17777?field:AssetID={ASSETID}?portalUr...

The asset id does generate as expected within the string above though, when tested in a webmap which is great. Just unsure of how the syntax differs when the Survey is hosted in a Portal environment

whereas I am still able to navigate to the URL and access the survey when I don't have the added clauses.

https://survey123.arcgis.com/share/c252e0d8a42c48a29efe623a0db17777?portalUrl=https://organization.c...

0 Kudos
abureaux
MVP Regular Contributor

...our Survey123 ... Enterprise environment

That is fine. Nothing really changes.

...the syntax of our URL looks a bit different with an added portion for the portal URL.

That added portion isn't strictly necessary. I don't use that in my URLs because the Field Apps I have employees using are already configured. That is to say, this component of the URL is optional.

unsure of how the syntax differs when the Survey is hosted in a Portal environment

It doesn't. This works in AGO and Enterprise environments.

You are also not bound to the Survey Site's new (and super annoying) URL format. You can still use the old URL format that opens S123 automatically. E.g., This is (basically) the URL I use for launching into S123 from webmaps in my Enterprise environment. Take notice of 1) no Portal reference, and 2) I am using the old (and better, IMO) URL (there is nothing wrong with going with the new URL though. I just find that extra step a waste of time).

arcgis-survey123://?itemID=44455566677788899911122233444&field:gn_pn={wbs1}&field:gn_phase={wbs2}&field:gn_client={ClName}