Select to view content in your preferred language

Field Maps URL to create & populate Survey123 only fills in half of the fields

270
4
Jump to solution
01-23-2025 07:50 AM
BrendonJoyce1
Frequent Contributor

Good morning all,

I have been using passthrough URLs with a lot of success. I am wondering if there is a limit to the URL length or number of fields you can pass through from a Map Viewer pop-up URL (used in Field Maps) to populate a Survey123.

I have matched the fields and types and I am only getting about half of the populated (~10) fields. I have made a second URL with the second half of the fields only and it fills those fields in.

I created one to go from Web Map to web survey (not my use case) but it fills all fields in.

I have surfed the site and see a few similar issues here - couldn't quite find a solution.

arcgis-survey123:///?itemID=xyzxyzxyzxyzx&field:pwsid={PWSID}&field:town={TOWN}&field:location={LOCATION}&field:infrastructuretype={INFRASTRUCTURETYPE}&field:breaktype={BREAKTYPE}&field:breakcause={BREAKCAUSE}&field:datebreak={DATEBREAK}&field:daterepair={DATEREPAIR}&field:repairs={REPAIRS}&field:notes={NOTES}&field:lengthreplaced={LENGTHREPLACED}&field:diameter={DIAMETER}&field:material={expression/expr2}&field:yearasset={YEAR}&field:depth={DEPTH}&field:soil={SOILCONDITION}&field:leakflowrate={LEAKFLOWRATE}&field:leakduration={LEAKDURATION}&field:leaktotal={LEAKTOTAL}&field:employeecontractor={EMPLOYEECONTRACTOR}&field:workorder={WORKORDER}

 

 

Thanks in advance!

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
BrendonJoyce1
Frequent Contributor

After testing with newly created points + with other users it is working as expected, even with string notes with special characters. I think my trouble is coming from older data maybe with something funky on the back end of the fields. Thanks for the input regardless!

View solution in original post

0 Kudos
4 Replies
DavidSolari
MVP Regular Contributor

A cursory Google search brings up 1024 and 2048 as common limits to the query chunk of a URL so I have to assume that's what you've hit. Some potential workarounds:

  • Use Arcade to format all your data as a JSON object, pass that into a single field, then use pulldata("@json") (docs link) to extract each field as a calculated default. This removes a ton of &field:fieldname= text which could squeak under the limit.
  • Use a custom encoding format to get the payload even smaller, then use a custom JavaScript function in the survey to convert that to JSON for pulldata to process. For example: if you have to send data for 25 fields, you can send it like Pipe|Wrench|25|12|1|0||1 and then use the | character to break out each value.
  • Pass through a unique ID for the parent feature, then use pulldata("@layer") to get the data from the parent feature service using a query. This won't work offline but allows you to transmit practically unlimited data
ClayDonaldsonSWCA
Frequent Contributor

Agreed - probably hitting the character limit! Another option would be to minimize the length of the values being passed. For example, if your domain for INFRASTRUCTURETYPE was:

- "transmission_pole" you could switch to "tp" or 1

BrendonJoyce1
Frequent Contributor

Thanks for the reply @DavidSolari & @ClayDonaldsonSWCA 

Here is an example url that only populates half...looking at 584 characters unless I am misunderstanding?
The url expression is 668.

BrendonJoyce1_0-1737661863751.png

 



For the Arcade format to JSON is that a big pull - I am not too inclined with scripting, would you have a resource for it that I could follow along with? Would I be doing that in my web map?

Thanks!

0 Kudos
BrendonJoyce1
Frequent Contributor

After testing with newly created points + with other users it is working as expected, even with string notes with special characters. I think my trouble is coming from older data maybe with something funky on the back end of the fields. Thanks for the input regardless!

0 Kudos