Field App to Survey123 Url Scheme stopped working after update of survey

1824
8
Jump to solution
04-28-2022 02:18 PM
AmeWunderle
New Contributor III

Hi all,

I updated a survey last week and now the survey will not open from the Field Maps App using the URL scheme with pre-populated values. It is stuck on "Loading Survey".  Previous to my update the survey was called properly, filling out the 4 fields I wanted to pre-populate and centering it over the coordinates sent.

The only thing I changed in my update is that I added two fields, one to a repeat (calling the position(..) calculation and another to the main survey (dummy text field). Neither of these fields were called or should have affected whether the survey can be opened or not.  

If I change the link in the URL to only the survey 

arcgis-survey123://?itemID={myitemid}&center={POINT_Y},{POINT_X} it opens the survey properly.  As soon as I add a field parameter (i.e. &field:Block_Name={Block_Name})...it is stuck on "Loading".

I also tried the UrlEncode function (https://developers.arcgis.com/arcade/function-reference/text_functions/#urlencode) to see if that was the issue, no change. 

The oddest thing is that the survey opens properly in the desktop Survey123 application with all the field parameters from the original link.

Survey123 Connect version 3.14.274 and Field App version 3.14.255

I also tried to simply re-create the survey as a copy, and still no dice.  Any suggestions are more than welcome. 

0 Kudos
1 Solution

Accepted Solutions
AmeWunderle
New Contributor III

Hi all, I figured out the issue. The field that I added was a text field (as I wanted to add it to a summary). I used the position(..) function to calculate the position in the repeat for my summary and it needed to return an integer. Once I added a new field doing the same action but set it up properly as an integer field I didn't have any issues with the Survey123 Field Application anymore. What's still interesting to me is that the desktop application never had an issue with this at all. 

View solution in original post

8 Replies
ZacharySutherby
Esri Regular Contributor

Hello @AmeWunderle

If you could pass along a copy of the XLSForm that would help with troubleshooting on our end. Do you see a difference if you already have the Survey123 app open in the background and link to it vs launching Survey123 fresh from Field Maps? 

If you see the same behavior with Survey123 open in the background can you please enable diagnostic logging in the Survey123 field app and then link to it from Field Maps? Obtaining a copy of the diagnostic log will also help with understanding what's happening when Survey123 tries to open the survey. 

Thank you,
Zach
0 Kudos
AmeWunderle
New Contributor III

Thanks Zach. I emailed you the XLSForm and the log file!

0 Kudos
KristinThorpe1
Occasional Contributor

Hi @ZacharySutherby ! I seem to be having the same issue Ame described above. I have a url link with prepopulated values in Field Maps to open an inspection form in Survey123. I already checked that the field types matched, so Ame's solution does not work for me. When Survey is not open in the background, Survey appears to get stuck on the green welcome/loading screen. As you suggested, I first opened Survey123 to leave running in the background and then opened Field Maps and clicked the link and the survey form opened with the prepopulated fields filled in.  Do you understand why this might be happening? This is the same workflow that I usually use for my inspection surveys but I only noticed this happening within the last week. I've attached the XLSForm and the URL link for your reference. Thank you!

 

arcgis-survey123://?itemID={myitemid}&callback=https://fieldmaps.arcgis.app&field:ProjectNumber={ProjectNumber}&field:ProjectName={ProjectName}&fie...}

0 Kudos
AmeWunderle
New Contributor III

Hey Kristin, I don't know if this will help, but I also had issues recently where I used "calculate" as a question type instead of decimal and that caused my field app to spin on the load screen. It worked with the desktop app but not the field app. I changed the question type from calculate to decimal and it worked. Worth a check anyway.

0 Kudos
KristinThorpe1
Occasional Contributor

Thanks for the suggestion. I don't have any "calculate" question types but I do use the calculation column to pulldata and calculate values. Unfortunately, I need the calculations to work and I'm not willing to rewrite my form unless I know that the calculations are the problem. Zach's suggestion of opening Survey123 first and running in the background seems to work, but it's not ideal.

0 Kudos
RossCampbell3
New Contributor II

Hi Zach,

I am having the same issue where my survey is stuck on 'Loading Survey' when I select the url link in Field Maps. Like the other users, I am passing data into the survey via URL parameters.

I do have Calculate field types in my survey. However, switching them to integer is changing the functionality of the calculations and form. Therefore I would like to avoid changing them from Calculate.

Is there a known issue that is causing surveys to be stuck on the Loading Survey screen? Is the only work around to change the Calculation questions?

Thank you,

Ross

0 Kudos
RossCampbell3
New Contributor II

I figured out the issue. I have a javascript function that works in Survey123 Connect, but was causing issues in the field app. Solved now.

0 Kudos
AmeWunderle
New Contributor III

Hi all, I figured out the issue. The field that I added was a text field (as I wanted to add it to a summary). I used the position(..) function to calculate the position in the repeat for my summary and it needed to return an integer. Once I added a new field doing the same action but set it up properly as an integer field I didn't have any issues with the Survey123 Field Application anymore. What's still interesting to me is that the desktop application never had an issue with this at all.