Select to view content in your preferred language

repeat question breaks url connection with FieldMaps

590
3
Jump to solution
06-28-2023 08:25 AM
MilesMcCoySulentic
Emerging Contributor

I'm trying to launch Survey123 forms from FieldMaps through a popup link but Survey123 fails to open some surveys when I try to pass a specific field from FieldMaps to S123 to populate a site name field. I can successfully launch the form with the "arcgis-survey123://?itemID=<ItemIDSurveyForm>" text in the popup configuration, but when I add "&field:FieldNameInSurvey123={FieldNameInFieldMaps}" onto the end of that, the survey fails to load and gets stuck on the "optimizing survey" screen. If I take out the two lines to start and end the repeat in the xlsx form, the survey launches just fine and will autopopulate the site name in the S123 form from the FieldMaps polygon. I have several different forms that all pull the same site name field from FieldMaps, all forms have the same site name field that I want autopopulated, and all forms have a repeat of some kind in the form. The one difference that I do see is that the functioning forms have a repeat that pulls text data from a csv file, while the forms that are failing to open have repeats with either a geopoint or a photo inside the repeat.

All S123 forms function fine on their own when opened up directly from S123. I think there's something I may be missing in how I set up the repeats for the geopoints and photos but I'm not sure what. 

Any help or suggestions would be greatly appreciated!

0 Kudos
1 Solution

Accepted Solutions
MilesMcCoySulentic
Emerging Contributor

I think I've figure it out. I was using the "position(..)" calculation for the ${SoilCoreNum} field incorrectly inside the repeat. I originally had it set as a "note" type. When I update the type to "integer" everything works swimmingly.

View solution in original post

3 Replies
DougBrowning
MVP Esteemed Contributor

Can you post some sample URLs?  A lot of times when these break it is due to special chars or field names.

If you want to pass data to repeats the best way is to pass into a dummy parent field then push that into the repeat inside the form.  

Hope that makes sense.

0 Kudos
MilesMcCoySulentic
Emerging Contributor

The SiteName field that I want to pass data to is outside of any repeat in the xlsx form, but it is used later to concatenate an id within the repeat. That concatenate calculation calls ${SiteName} directly, and not an extra dummy field, but I have something similar in another form that seems to work allright.

 

This url link opens the survey just fine, but does not populate the SiteName attribute in the S123 form:

arcgis-survey123://?itemID=1acad0b94c7c4d8e9262549a915da916

This url link opens S123 app but freezes at a grey screen with a spinning green wheel saying "loading survey"  

arcgis-survey123://?itemID=1acad0b94c7c4d8e9262549a915da916&field:SiteName={Name}

This same text above (though different itemID) works to populate a different S123 survey with SiteName from the same polygon in FieldMaps.

Below is the xlsx for one of the forms that does not function when I try to populate the SiteName field. I removed just the "begin repeat" and "end repeat" rows and the full url link worked, but would really like to make this a repeat. I also tried making the ${SiteName} type "note", "select_one", and "text", but that didn't fix the issue.

Sorry it's just a snip image, wasn't sure how/if I could attach it.

MilesMcCoySulentic_0-1687973516173.png

This is just the beginning of another form that is linked to the same polygon in FieldMaps where SiteName does get populated when S123 is opened from FieldMaps. Just to show SiteName is spelled the same.

MilesMcCoySulentic_1-1687974051578.png

 

 

0 Kudos
MilesMcCoySulentic
Emerging Contributor

I think I've figure it out. I was using the "position(..)" calculation for the ${SoilCoreNum} field incorrectly inside the repeat. I originally had it set as a "note" type. When I update the type to "integer" everything works swimmingly.