Unable to pass "center" attribute from web app to Survey123 web app

948
1
Jump to solution
07-28-2021 09:21 AM
Ramon_de_Leon
Occasional Contributor

I have a working link that pass attribute values (including center location, I pre-calculated the WGS84 latitude, longitude, and lat-long pairing fields ) from Field Maps to Survey123 app:

arcgis-survey123://?itemID=1d71b9c869c44a27a68d10115bd3aa54&center={CENTER_COORD} &field:meter_number={meter_number} &field:account_number={account_number} &field:sub_code={SUB_CODE} &field:feeder_number={FEEDER} &field:circuit_id={circuit_id1} &field:county={BI_CNTY_CD} &field:board_district={BI_BOARD_DIST_CD} &field:service_status={status} &field:last_name={BI_LNAME} &field:first_name={BI_FNAME} &field:phone_home={HomePhone} &field:phone_mobile={MobilePhone} &field:phone_business={BusinessPhone} &field:phone_other={OtherPhone} &field:email_the_member={Email} &field:service_address_1={BI_ADDR1} &field:service_address_2={BI_ADDR2} &field:service_city={BI_CITY} &field:service_state_name={BI_ST} &field:service_zip_code={BI_ZIP} &field:bill_address_1={BILL_ADDR1} &field:bill_address_2={BILL_ADDR2} &field:bill_address_3={BILL_ADDR3} &field:bill_city={BILL_CITY} &field:bill_state_name={BILL_ST} &field:bill_zip_code={BILL_ZIP} &field:bill_cycle_code={BI_CYC_CD} &field:bill_route_code={BI_ROUTE_CD}

Ramon_de_Leon_0-1627488241288.png

 

Now users want the option to be able to do the survey via Survey123 web app and get launched through a web application.

My link works good in passing the attribute information to pre-populate the survey except for the center of the point, it keeps on putting the location at 0,0 lat-long. I read that for web apps it is sensitive to commas/spaces, so I change my link to replace "center={CENTER_COORD}" with "center={LAT_DD}%2C{LONG_DD}" also tried "center={LAT_DD},{LONG_DD}", but when I launch the survey from the web application and finish it still put the point at 0,0 lat-long.

Also tried doing URL encode of the lat-long attributes via Arcade and still the same issue (I also noticed that when Survey123 web app was launched the values from the Arcade fields were not passed to the URL):

  • urlencode ($feature["CENTER_COORD"])
  • urlencode (text ($feature["LAT_DD"]) + ',' + text ($feature["LONG_DD"]))

 

Just for trial, I even tried putting absolute lat-long and no success:

  • 15bd3aa54?center=28.75162186,-82.06278574&field:meter_number={meter_number}
  • 15bd3aa54?center=28.75162186%2C-82.06278574&field:meter_number={meter_number}

 

My current link is below, can anyone help on how to troubleshoot the passing of the correct lat-long information to the Survey123 web app? Thank you.

https://survey123.arcgis.com/share/1d71b9c869c44a27a68d10115bd3aa54?center={LAT_DD}%2C{LONG_DD}&fiel...}

Is this a current bug?

 

0 Kudos
1 Solution

Accepted Solutions
Ramon_de_Leon
Occasional Contributor

Got the fix for my issue via Esri Solution Engineering team and our Account Manager. Thank you very much.

The thing that I missed is that the "center" parameter in Survey123 web app requires that you have a "geopoint question" and flagged it as "required". We initially designed the survey for field use only, and the geopoint question is not required for the passing the "center" parameter from Collector to Survey123 mobile app.

 

I added the geopoint question and republished my XLS form and the link is now working and passing the "center" parameter as expected.

View solution in original post

0 Kudos
1 Reply
Ramon_de_Leon
Occasional Contributor

Got the fix for my issue via Esri Solution Engineering team and our Account Manager. Thank you very much.

The thing that I missed is that the "center" parameter in Survey123 web app requires that you have a "geopoint question" and flagged it as "required". We initially designed the survey for field use only, and the geopoint question is not required for the passing the "center" parameter from Collector to Survey123 mobile app.

 

I added the geopoint question and republished my XLS form and the link is now working and passing the "center" parameter as expected.

0 Kudos