Hello,
I built a mobile solution that leverages both Field Maps and Survey123 back in 2021. When users click the asset on the map in Field Maps, a hyper link is created with selected feature's attributes and some real-time calculated values.
I used Classic Map Viewer at that time, and things worked smoothly. Since 2022, it was not in much use, and today I found out that the URL parameter I've created does not work anymore.
Can someone advice where I need to look at it? or perhaps save it as (new) Map Viewer?
Here is a sample url being created on the fly (I replaced parameter values to random text as my data is not public)
arcgis-survey123://?itemID=ItemID&field:Structure_Number=0233&field:Structure_Name=TOWER%20BANK&field:Highway=17&field:Critical_Route=no&field:Asset_Type=BRIDGE&field:Service_Area=A6¢er=yvalue, xvlalue&callback=https://fieldmaps.arcgis.app/?
Addition:
With more investigation, I found callback and center worked, but if I include field/value in the URL the survey123 form is not loading.
Hi @KerryKang , what happens, if you change your link to
https://survey123.arcgis.app/?itemID=ItemID&field:Structure_Number=0233&field:Structure_Name=TOWER%20BANK&field:Highway=17&field:Critical_Route=no&field:Asset_Type=BRIDGE&field:Service_Area=A6¢er=yvalue, xvlalue&callback=https%3A%2F%2Ffieldmaps.arcgis.app%2F
Those type of links work in our environment with Field Maps and Survey123.
The user is having issues with fields and values so manually doin
g this isn't an option.
@KerryKang you should use the UrlEncode function when generating a URL
Personally I like this Arcade snippet. Add the {expression/0} as the hyperlink for the pop-up text.
var urlsource = 'arcgis-survey123://?';
var params = {
// update itemid
itemID: '<item_id>',
// update parameters
"field:field_one":$feature["fieldone_fromthemap"],
"field:field_two":$feature["fieldtwo_fromthemap"],
callback:'https://fieldmaps.arcgis.app'
};
return urlsource + UrlEncode(params);
Thank you for the tip. When I tested it it works as long as I only contained item ID, center values (I hard coded in the example), and callback. Once I included any fields and their values, the survey kept spinning and ended up not opening.
Thank you.
Kerry
oh, that's my bad. I was doing some testing including/excluding certain fields.
With commas between parameters, it still does not load. Do you have other suggestions where I can look at?
Thank you.
Kerry
Are you using new map viewer? I would recommend you do. Just note that pop-ups no longer drive editability (it's forms) and this could impact edit multiple.
Can you share your latest code?