Select to view content in your preferred language

How to prepopulate a geopoint location in S123 from an existing feature in Collector?

5989
11
Jump to solution
02-28-2020 12:33 PM
KacyBeck2
Emerging Contributor

I have a map with a layer that contains points for security lights that need to be inspected.

I also have a Survey 123 form that the field personnel will use to fill out for each inspection location.

I have already set up a Custom URL in the popup configuration for the existing security light features to prepopulate most of the Survey 123 questions with attribute information from the security lights existing information.

What I'm having trouble with is finding a way, if there is, to prepopulate the geopoint question in the Survey 123 form with the location data from the point that the Custom URL is clicked on to start the survey.

Is there a simple way to do this with a custom URL?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

You will need to do two things the help this work -

  1. Add two data fields to the original layer to contain the Latitude and Longitude coordinate values for each of the security lights.
  2. You will need to add to the end of the Custom URL the following &center= ${Latitude},${Longitude}


This should pre-populate the the Geopoint question with the location of the security light the employee is working on.

Good luck,

Mike

View solution in original post

0 Kudos
11 Replies
by Anonymous User
Not applicable

You will need to do two things the help this work -

  1. Add two data fields to the original layer to contain the Latitude and Longitude coordinate values for each of the security lights.
  2. You will need to add to the end of the Custom URL the following &center= ${Latitude},${Longitude}


This should pre-populate the the Geopoint question with the location of the security light the employee is working on.

Good luck,

Mike

0 Kudos
KacyBeck2
Emerging Contributor

I came across that solution since I do have existing X and Y fields, however it's not working for me.

I have since read that the Latitude and Longitude need to be in Decimal Degrees in those fields, whereas mine are not (i.e- X is 1284877.1711 and Y is 2108151.0050).

So I'm having trouble getting my coordinates in the correct format through AGOL, assuming that's what's causing the issue here.

0 Kudos
KacyBeck2
Emerging Contributor

So I ended up just using ArcMap to do a Calculate Geometry for Decimal Degrees on a new field, and reload the feature to AGOL.

I used the &center= ${Latitude},${Longitude} however it worked fine for me without the "$"s

0 Kudos
DryCreekEng
Frequent Contributor

I have crews checking pest traps and they record their data using Collector. I would like the trap ID in the Collector map to prepopulate based on their location when they get to a trap. Kacy, does your script do something similar by prepopulating fields based on their location near a known point? If so, can you share how you created the URL popup to do that?

Thanks,

Natalie

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Natalie,

Please refer to Integrate with other apps—Survey123 for ArcGIS | Documentation  - fields can be prepopulated by using the URL parameter field:<field_name>=<value> .  As an example, you would create a URL in the web map pop-up of the map Collector uses:

arcgis-survey123://?itemID=<FORM_ID>&field:trap_id_q={trap_id}

where <FORM_ID> is the item id of the form you want to open, trap_id_q is the name of the question you want to populate and trap_id is the field in the layer in Collector that you want to use as a value.

0 Kudos
DryCreekEng
Frequent Contributor

Thank you James, this was very helpful. I was able to get it functioning correctly.

0 Kudos
JessicaJThompson
Frequent Contributor

Hello James,

(Currently using the most up-to-date Survey123 & Field Maps apps on an iOS, and Survey123 Connect 3.11.125 to write my survery)

I am wondering if I can accomplish a similar feat with a parcel layer that does not have lat/long with each polygon. Current workflow -

Surveyor is using a custom map in Field Maps. They click on a parcel. The pop-up has a link with a custom URL to survey123 that includes a callback, and autopopulate of 2 questions. -->

arcgis-survey123://?itemID=c9a8eec6ad4e4d3e82b2e91054d1e8ba&callback=https://fieldmaps.arcgis.app/?itemID=0494ced53b7246ebbcf2ab4aa810e1c6&field:address={PropAddress_Ful...}

I am interested in capturing the lat/long of where they clicked (within the parcel, not where they are standing) in field maps and having that autopopulate in Survey123 as a geopoint question (though ideally a geoshape question where the parcel is pulled in, but as far as I know I would have to have the lat/long of every vertex within that polygon listed to accomplish that. Happy to be proven wrong). 

How would I modify the custom URL above to accomplish autopopulating a geopoint question? Is there a way without an x/y field in the parcel layer? 

 

The following is the documentation I have looked through through but have had trouble understanding/getting to work.

JessicaJThompson_0-1621871787161.png

 

JessicaJThompson_1-1621871787164.png

 

Below are some resources on this for your reference:

  1. https://community.esri.com/t5/arcgis-survey123-blog/understanding-survey123-s-custom-url-scheme/ba-p...
  2. https://support.esri.com/en/technical-article/000017982 [linkprotect.cudasvc.com]
  3. https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm [linkprotect.cudasvc.com]

Thank you for your assitance!!

Cheers,

Jessica Thompson

0 Kudos
cat206
by
Frequent Contributor

Hi Jessica, this is exactly what I am after but struggling to understand the webpage, did you ever get to the bottom of what you need to do without adding XY fields?

0 Kudos
Tiff
by
Frequent Contributor

Hi @cat206 and @JessicaJThompson - I am having this same question now for a survey I am building out. Wondering if there have been any updates for either of you?

0 Kudos