Select to view content in your preferred language

Custom URL Scheme

1768
9
08-31-2017 04:33 PM
AdamDaily
Frequent Contributor

Can I use custom URL scheme to pre-populate a field within a repeat from a field outside a repeat in the same survey? From a field outside a group that has a relevant statement? Or even from a field outside a group?

I am using 1 survey to collect points/attributes within 1 group of questions (relevant from answer to previous question) and then conduct multiple surveys against those same points using another group of questions inside a repeat (again relevant based on answer to previous question).

Since I can call my survey from my arcgis online map (displaying the points being collected),  I want to pre-populate some attributes in the survey (details related to that point I clicked on) by setting parameters within the custom URL scheme that calls my survey. 

0 Kudos
9 Replies
IsmaelChivite
Esri Notable Contributor

Hi. Unfortunately, it is not possible to use the custom_url scheme to populate questions within a repeat.

0 Kudos
by Anonymous User
Not applicable

Would there be a chance of pushing the answer/parameter of a question into a note or text field and then have the value placed into the repeat through a calculation?

Survey 1 Question 1's answer would be pushed into Survey 2 Note or Text field one. Then the field within the repeat would have a calculation equal to the note or text field?

This is interesting and I might be misunderstanding the question, but I have a form that uses this similar technique that is launched from Collector to pass value from Collector into the Survey123; using custom URL schema, form outside of a repeat, that has a question within the repeat that equals the value of the question outside of the repeat. If this is a bug, then by all means please leave it be.

We have predetermined Cell IDs that are pushed from the collector app into a survey123 form. The survey123 form contains a repeat that uses the pushed value to build a new ID. The values being passed are strings in nature and very small in size. For example we push the value "KM001" from collector into survey123 and then add a letter to designate a sample site, so we end up with "KM001A, KM001B, KM001C". These new values are created through a concat() of the answer that was pushed over and the Net ID.

This the field outside of the repeat.

Here is the value within a repeat.

Here is the xlsx form set up.

If this is a bug, then please let it be as it is very useful.

AdamDaily
Frequent Contributor

The use of repeats in survey123 is a great tool. It allows me to design a survey that acts as both a data collection app and a survey app against that data collected. Repeats allow you to create a full workflow that is self contained inside 1 survey.  But if I have no way to call that point information back to show an end user conducting a survey, then all of that great functionality a repeat provides is immediately lost. That is unfortunate as this could be a really powerful app.

0 Kudos
AdamDaily
Frequent Contributor

Since I cant use repeats, I've had to completely redesign my workflow and split this into 2 surveys, one for collecting point info, and 1 for collecting surveys for those points. After all of that, I now can not pass XY data over to my surveys to display on my map. My related surveys show up off the coast of Africa. 

Is it just not possible using Survey123? I've opened up several esri work tickets on these issues as well and nobody can seem to give me any answers. I was very hopeful this app could do what we wanted it to do, but these limitations I keep running into may cause us to have to go in a different direction.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Adam,

Can you share the details of the survey setup?  Passing latitude and longitude into the Survey is certainly possible.

0 Kudos
AdamDaily
Frequent Contributor

Glad to hear that and thank you for the response. I have matching Latitude/Longitude decimal fields in both surveys. I’m collecting geopoints using pulldata("@geopoint",$,"y")/x calculations. Then selecting the point in a webmap to call my other survey. Points display in correct locations in my map.

I’m using custom URL scheme to transfer/populate matching attribute fields. When I match a txt field it works. Lat/long decimal fields do not. If I submit a completed survey then zoom to it in my table, I end up on the other side of the world.

Scheme I am trying to use to pull selected point attributes into matching fields in my survey:

arcgis-survey123://?itemID=SURVEY&field:latitude=&field:asset_tag=

Asset tag/feature type populates

Long/Lat fields remain blank

Pic attached of table/location of survey results

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Is there a reason you're sending the locations to a field and not the center=<lat>,<long> to se the geopoint question's location (From Integrate with other apps—Survey123 for ArcGIS | ArcGIS , 

arcgis-survey123://?itemID=36ff9e8c13e042a58cfce4ad87f55d19&field:Surname=Klauser&center=37.8199,-122.4783

)

0 Kudos
AdamDaily
Frequent Contributor

I wanted to include the same XY as my original point but if I can pass a matching asset ID along with using center= its probably not needed. I think I have figured out my problem, but how do you eliminate the formatting rule to pass all decimal values to survey123 instead of cutting it off at 2 places for lat/long? 

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Adam,

The 2 decimal limitation comes from the popup setup of the layer in the web map: