<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help with Survey123 link from Field Maps with callback to Field Maps in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1397236#M55556</link>
    <description>&lt;P&gt;You use the custom popup and then the URL button like this.&amp;nbsp; This is Map Viewer Classic but same concept in new map viewer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CustomPopupURL.gif" style="width: 772px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98300i47F87333FCB05A5E/image-dimensions/772x409?v=v2" width="772" height="409" role="button" title="CustomPopupURL.gif" alt="CustomPopupURL.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I only create new features not edit.&amp;nbsp; To edit yes you would need the globalid also.&amp;nbsp; I think you can add this by using Arcade to just get the globlalid and add that to the URL using&amp;nbsp;{expression/expr0} notation.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do that a lot since I need to call from the child to the parent to get a number of fields I need that I then send to the form.&lt;/P&gt;&lt;P&gt;arcgis-survey123://?itemID=38e3353292dsfsdfsdfcb121a6&amp;amp;field:PointID={PointID}&amp;amp;field:EvaluationID={expression/expr0}&amp;amp;field:DesignLat={expression/expr6}&amp;amp;callback=&lt;A href="https://fieldmaps.arcgis.app" target="_blank"&gt;https://fieldmaps.arcgis.app&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Arcade I use for the lookup to the parent is this below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;DesignLat {expression/expr6}&lt;BR /&gt;var tbl = FeatureSetByRelationshipName($feature, "Points", ['DesignLat'], false);&lt;BR /&gt;return First(tbl).DesignLat&lt;/P&gt;&lt;P&gt;But I think for you if you are in the linking feature just&amp;nbsp;&lt;/P&gt;&lt;P&gt;return&amp;nbsp;$feature.GlobalID&amp;nbsp; &amp;nbsp;should work.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2024 13:53:31 GMT</pubDate>
    <dc:creator>DougBrowning</dc:creator>
    <dc:date>2024-03-18T13:53:31Z</dc:date>
    <item>
      <title>Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1306591#M50506</link>
      <description>&lt;P&gt;I'm trying to create a link to launch a survey123 survey with attributes passed from the selected feature in field maps and then use the callback to return to field maps and update an attribute on the feature that the survey was launched from.&amp;nbsp; I've been reading ESRI's documentation at&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm" target="_blank"&gt;https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/field-maps/ios/help/deploy-your-map.htm" target="_blank"&gt;https://doc.arcgis.com/en/field-maps/ios/help/deploy-your-map.htm&lt;/A&gt;&amp;nbsp;along with posts here in the community but can't get the attributes to update with the callback and not sure what I'm missing.&amp;nbsp; I'm using the Arcade content within the popup to add the link and I've attached my Arcade code below.&amp;nbsp; It launches Survey123 and populates attributes in the Survey as I want and returns to field maps when the survey is submitted, but I can't get the attribute to update on the callback.&lt;/P&gt;&lt;P&gt;featureSourceURL is the url to the hosted feature service and the layer within that service is layer 0.&amp;nbsp; I'm thinking this might be part of the problem as if I past the url into the browser I get a token required page, but I've tried generating a token and adding the token to the url and that broke the callback.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var S123 = "arcgis-survey123://?itemID=###"
var S123_Attributes = "&amp;amp;field:Stand_Habitat_Type={Stand_Habitat_Type}&amp;amp;field:incoming={GlobalID}"

var Callback = "&amp;amp;callback="
var CallbackFM = UrlEncode("https://fieldmaps.arcgis.app/?referenceContext=updateFeature")
var callbackID = UrlEncode("&amp;amp;itemID=###")
var callbackFeatureSource = UrlEncode("&amp;amp;featureSourceURL=https://services1.arcgis.com/###/arcgis/rest/services/AspenSurvey/FeatureServer/0")
var callbackFeatureID = UrlEncode("&amp;amp;featureID=")
var callbackFeatureGlobalID = UrlEncode($feature.GlobalID)
var callbackFeatureAttributes = UrlEncode('featureAttributes={"ConditionSurvey":"Yes"}')
var fullCallback = CallbackFM + callbackID + callbackFeatureSource + callbackFeatureID + callbackFeatureGlobalID + callbackFeatureAttributes
var fullURL = S123 + S123_Attributes + Callback + fullCallback

return { 
	type : 'text', 
	text : '&amp;lt;a href=' + fullURL + '&amp;gt;Open Survey with Callback&amp;lt;/a&amp;gt;' 
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 16:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1306591#M50506</guid>
      <dc:creator>DavidHood_USFS</dc:creator>
      <dc:date>2023-07-07T16:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1306608#M50509</link>
      <description>&lt;P&gt;These can be really hard.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue I had was the URL is static when made and cannot send back any new data which makes sense but you seem to have static data.&amp;nbsp; I think I got away with no encoding but I do not remember.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This post may help you&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-send-data-back-from-survey123-in/m-p/1062015" target="_blank"&gt;https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-send-data-back-from-survey123-in/m-p/1062015&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 17:45:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1306608#M50509</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2023-07-07T17:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1306690#M50518</link>
      <description>&lt;P&gt;Thanks Doug, I have read that previous post of your and the replies several times and was where I got some of my arcade script from.&amp;nbsp; Yeah, I'm pulling attributes from data in the map and the link has those replaced properly when I check in within map viewer.&lt;/P&gt;&lt;P&gt;Though I just went to double check the link that is being created in Map Viewer and the FeatureID is properly populating with the features GlobalID, I did noticed the featureAttribute part is still showing up with the " in the URL (featureAttributes%3D%7B"ConditionSurvey"%3A"Yes"%7D) using the Arcade UrlEncode function so I tried manually encoding it then encoding it again and I'm able to rid of them but still not updating the feature as it appears should happen (featureAttributes%253D%257B%2522ConditionSurvey%2522%253A%2522Yes%2522%257D).&lt;/P&gt;&lt;P&gt;Here is the full URL (double encoded on the featureAttribute part) I'm getting, though I've redacted ItemID's with ## as well as part of the Feature URL:&amp;nbsp; arcgis-survey123://?itemID=##&amp;amp;field:Stand_Habitat_Type=Talus&amp;amp;field:incoming=82cf6bd4-a4d6-43d7-a955-9ed42e2f1ea4&amp;amp;callback=https%3A%2F%2Ffieldmaps.arcgis.app%2F%3FreferenceContext%3DupdateFeature%26itemID%3D##%26featureSourceURL%3Dhttps%3A%2F%2Fservices1.arcgis.com%2F##%2Farcgis%2Frest%2Fservices%2FAspenSurvey%2FFeatureServer%2F0%26featureID%3D82cf6bd4-a4d6-43d7-a955-9ed42e2f1ea4featureAttributes%3D%7B%22ConditionSurvey%22%3A%22Yes%22%7D&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 20:51:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1306690#M50518</guid>
      <dc:creator>DavidHood_USFS</dc:creator>
      <dc:date>2023-07-07T20:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1306712#M50521</link>
      <description>&lt;P&gt;If I remember right I never got using fields to work in the callback but hardcoding like you did I think I did get one of these two to work.&amp;nbsp; Trying to remember but I think when I did it I made the whole URL then encoded it on a website encoder then pasted that in the popup.&lt;/P&gt;&lt;P&gt;Maybe it will give you a hint.&amp;nbsp; Sorry I do not know more.&lt;/P&gt;&lt;P&gt;arcgis-survey123://?itemID=9269d29cfc56ee345&amp;amp;field:LOCAL_ID={LOCAL_ID}&amp;amp;field:GeoGUID={globalid}&amp;amp;callback=https%3A%2F%2Ffieldmaps.arcgis.app%3FitemID%3D60898699d9194370985ba5d1b88ac966%26referenceContext%3DupdateFeature%26featureSourceURL%3Dhttps%3A%2F%2Fservices1.arcgis.com%2FHp6G80Pky0om7QvQ%2Farcgis%2Frest%2Fservices%2FPFCRCTest4%2FFeatureServer%2F0%26featureID%3D431c51d1-2570-4677-a13e-4a42d582cf66%26featureAttributes%3D%257B%2522LOCAL_ID%2522%3A%2522testhardcode%2522%2C%2522FormGUID%2522%3A%2522hardid%2522%257D&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;arcgis-survey123://?itemID=92656ee345&amp;amp;field:LOCAL_ID={LOCAL_ID}&amp;amp;field:GeoGUID={globalid}&amp;amp;callback=https%3A%2F%2Ffieldmaps.arcgis.app%3FitemID%3D60898699d9194370985ba5d1b88ac966%26referenceContext%3DupdateFeature%26featureSourceURL%3Dhttps%3A%2F%2Fservices1.arcgis.com%2FHp6G80Pky0om7QvQ%2Farcgis%2Frest%2Fservices%2FPFCRCTest4%2FFeatureServer%2F0%26featureID%3D431c51d1-2570-4677-a13e-4a42d582cf66%26featureAttributes%3D%257B%2522LOCAL_ID%2522%3A%2522testhardcode%2522%2C%2522FormGUID%2522%3A%2522hardid%2522%257D&lt;/P&gt;&lt;P&gt;Only thing I see is you have referenceContext then the itemid and I have itemid then referenceContext.&amp;nbsp; I remember playing with that but not sure if that is it.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 21:40:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1306712#M50521</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2023-07-07T21:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1307395#M50582</link>
      <description>&lt;P&gt;Thanks again for the help Doug. I was able to get this working with some help from another coworker and wanted to share what I did in case anyone else has similar issues.&lt;/P&gt;&lt;P&gt;Confirgure popups for the layer and go to Options &amp;gt; Attribute Expressions.&amp;nbsp; I created a new expression with the code below.&amp;nbsp; I then used the Add Content and added a text element to the popup and used the field for that expression to create the link.&amp;nbsp; This didn't really change anything from what I had originally so not sure what exactly the problem was, but glad I got it working.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// To launch survey123 from map
// EDIT THIS LINK TO MATCH YOUR SURVEY LINK (Only edit AFTER itemID= and BEFORE &amp;amp;

var urlsource ="arcgis-survey123://?itemID=###&amp;amp;"
 
//Format globalid to "link" survey point to map data  -- MUST have globalid field for this script to work. DO NOT EDIT THIS LINE

var fglobalid = Mid($feature.GlobalID, 1,36)

//Generate other url parameters to pass to survey123. -- These are the values you wish to transfer from Field Maps to your Survey123 form.
// Edit or delete fields as necessary. The line containing $feature.GlobalID MUST NOT BE REMOVED, but the field to the left of $feature.GlobalID may
// be changed to reflect the field in your Survey to store the GlobalID.

var params = {
  "field:incoming": $feature.GlobalID,
  "field:Stand_Habitat_Type": $feature.Stand_Habitat_Type,  
};


// Create callback portion of link using itemID (map ID) and featureSourceURL (services link to the layer containing the feature to be edited following survey submission)
// EDIT THIS LINK FOR LNF MAP AND LNF POINT FEATURE CLASS.  updateFeature&amp;amp;itemID=&amp;lt;your maps ID&amp;gt;&amp;amp;featureSourceURL=&amp;lt;link to the feature class to be edited&amp;gt;

var callback = {
  callback:"https://fieldmaps.arcgis.app/?referenceContext=updateFeature&amp;amp;itemID=###&amp;amp;featureSourceURL=https://services1.arcgis.com/###/arcgis/rest/services/AspenSurvey/FeatureServer/0",

}

// // Add featureID (must be var fglobalid) portion of callback link
// THIS LINE MUST NOT BE CHANGED. This line is what tells the script which point in the feature class will be edited

var callbackid = "featureID=" + fglobalid


var callbackattribute = 'featureAttributes={"ConditionSurvey":"Complete"}'  // -- this would edit the ConditionSurvey field to reflect survey at the current point is complete


// Return the entire link/URL. This is what the FieldMaps app is following when you click the link to enter survey data. This should not be changed unless there is no callback
// attribute to pass back to Field Maps

return urlsource + UrlEncode(params) + "&amp;amp;" + UrlEncode(callback) + "%26" + UrlEncode(callbackid) + "%26" + UrlEncode(callbackattribute)


// For use in the pop-up for your featureclass, simply enter the expression name in the link field (i.e. {expression/expr0})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 18:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1307395#M50582</guid>
      <dc:creator>DavidHood_USFS</dc:creator>
      <dc:date>2023-07-11T18:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1321978#M51377</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/244368"&gt;@DavidHood_USFS&lt;/a&gt;&amp;nbsp; Thanks for your detailed commenting in the example you provided. I was struggling with a callback until I found this post. Cheer!!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 00:51:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1321978#M51377</guid>
      <dc:creator>AndrewPadilla</dc:creator>
      <dc:date>2023-08-24T00:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1381557#M54744</link>
      <description>&lt;P&gt;Dear David,&lt;BR /&gt;does this also work offline? I would like to create a FieldMaps with Survey link in pop ups for an inspection. When the survey is filled out, I should "jump" back to the field maps. The problem is after the completed survey the point in Field Maps should change from red (inspection was not completed) to green (inspection was completed). But all this should run offline. Is it possible? I would like to know the answer first before I start creating the whole web map, field maps project and surveys.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 14:36:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1381557#M54744</guid>
      <dc:creator>AnastasiiaBlöchl</dc:creator>
      <dc:date>2024-02-13T14:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1381596#M54747</link>
      <description>&lt;P&gt;Yes this worked offline in my testing.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 15:18:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1381596#M54747</guid>
      <dc:creator>DavidHood_USFS</dc:creator>
      <dc:date>2024-02-13T15:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1381598#M54748</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 15:23:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1381598#M54748</guid>
      <dc:creator>AnastasiiaBlöchl</dc:creator>
      <dc:date>2024-02-13T15:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1381983#M54769</link>
      <description>&lt;P&gt;For those looking at the above solutions, here's my cutback version of the code provided which still passes attributes from the selected feature to the survey and does the callback, but without the portion of the code that updates the feature in FieldMaps after completing the survey (simply put, launches a survey but returns you to FieldMaps with the original feature selected but no edits occur).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/244368"&gt;@DavidHood_USFS&lt;/a&gt;&amp;nbsp;for this code - it works a treat!&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// To launch survey123 from map
// EDIT THIS LINK TO MATCH YOUR SURVEY LINK (Only edit AFTER itemID= and BEFORE &amp;amp;

var urlsource ="arcgis-survey123://?itemID=##############################&amp;amp;"
 
//Format globalid to "link" survey point to map data  -- MUST have globalid field for this script to work. DO NOT EDIT THIS LINE

var fglobalid = Mid($feature.GlobalID, 1,36)

//Generate other url parameters to pass to survey123. -- These are the values you wish to transfer from Field Maps to your Survey123 form.
// Edit or delete fields as necessary. 

var params = {
  "field:plantation": $feature.Field1,
  "field:compartment": $feature.Field2,  
  "field:stand": $feature.Field3,  
};


// Create callback portion of link using itemID (map ID)
// Only edit AFTER itemID=

var callback = {
  callback:"https://fieldmaps.arcgis.app/?referenceContext=open&amp;amp;itemID=################################",

}

// // Add featureID (must be var fglobalid) portion of callback link
// THIS LINE MUST NOT BE CHANGED. This line is what tells the script which point in the feature class will be selected

var callbackid = "featureID=" + fglobalid

// Return the entire link/URL. This is what the FieldMaps app is following when you click the link to enter survey data. This should not be changed unless there is no callback
// attribute to pass back to Field Maps

/// return urlsource + UrlEncode(params) + "&amp;amp;" + UrlEncode(callback)
return urlsource + UrlEncode(params) + "&amp;amp;" + UrlEncode(callback)

// For use in the pop-up for your featureclass, simply enter the expression name in the link field (i.e. {expression/expr0})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 00:29:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1381983#M54769</guid>
      <dc:creator>LindsayRaabe_FPCWA</dc:creator>
      <dc:date>2024-02-14T00:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1382228#M54773</link>
      <description>&lt;P&gt;One note&amp;nbsp; - if you want to simply flip back to Field Maps all you have to do is this&amp;nbsp;&amp;nbsp;&amp;amp;callback=&lt;A href="https://fieldmaps.arcgis.app" target="_blank"&gt;https://fieldmaps.arcgis.app&lt;/A&gt; and it will quickly flip back to the app.&amp;nbsp; No need to specify a item or anything else.&amp;nbsp; It just returns to whatever state it was and is fast.&lt;/P&gt;&lt;P&gt;For me I skip Arcade totally to build the URL and simply use a custom popup with HTML.&amp;nbsp; I use Arcade to grab any data I want from a parent but other than that you can just reference the field you want then ref the the URL using {expression/expr13}.&amp;nbsp; Also no need to Encode the URL.&amp;nbsp; It works fine.&lt;/P&gt;&lt;P&gt;arcgis-survey123://?itemID=a44a3e1513ecf36567&amp;amp;field:PointID={PointID}&amp;amp;field:EvaluationID={expression/expr0}&amp;amp;field:CollectTNTP={expression/expr13}&amp;amp;field:CollectTurbidity={expression/expr14}&amp;amp;field:Project={Project}&amp;amp;field:ProtocolType={ProtocolType}&amp;amp;field:StreamName={expression/expr35}&amp;amp;callback=&lt;A href="https://fieldmaps.arcgis.app" target="_blank"&gt;https://fieldmaps.arcgis.app&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am sure there may be times when you need Arcade for the URL but for most cases I just build them out in a text doc and then add the URL in the pop up.&amp;nbsp; Been working for years now.&lt;/P&gt;&lt;P&gt;Hope that helps someone.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:02:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1382228#M54773</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2024-02-14T15:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1382248#M54776</link>
      <description>&lt;P&gt;During my testing it didn't work.&lt;/P&gt;&lt;P&gt;When Survey123 and FieldMaps App are offline (for example during a tree inventory in a forest) i think it is not possible, that the data can be pased from one app to the other app because the step of syncronisation with arcgis online is needed. The two apps have different folders on the mobile device, where the data is stored local for offline use, so there is no connection possible when both apps are offline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How did you manage to make it work offline?&amp;nbsp; Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:45:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1382248#M54776</guid>
      <dc:creator>Marcel_Schmidt</dc:creator>
      <dc:date>2024-02-14T15:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1382259#M54777</link>
      <description>&lt;P&gt;I have modified your code as follows:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// To launch survey123 from map
// EDIT THIS LINK TO MATCH YOUR SURVEY LINK (Only edit AFTER itemID= and BEFORE &amp;amp;

var urlsource ="arcgis-survey123://?itemID=67e58096e6c34a89a40a98176f0b3e61&amp;amp;action=edit&amp;amp;"
 
//Format globalid to "link" survey point to map data  -- MUST have globalid field for this script to work. DO NOT EDIT THIS LINE

var fglobalid = Mid($feature.GlobalID, 1,36)

//Generate other url parameters to pass to survey123. -- These are the values you wish to transfer from Field Maps to your Survey123 form.
// Edit or delete fields as necessary. The line containing $feature.GlobalID MUST NOT BE REMOVED, but the field to the left of $feature.GlobalID may
// be changed to reflect the field in your Survey to store the GlobalID.

var params = {
  "q:globalId": $feature.GlobalID,
  "field:Baumart": $feature.Baumart,
  "field:Bemerkung": $feature.Bemerkung,
  "field:latitude": Geometry($feature).Y,
  "field:longitude": Geometry($feature).X,
};


// Create callback portion of link using itemID (map ID) and featureSourceURL (services link to the layer containing the feature to be edited following survey submission)
// EDIT THIS LINK FOR LNF MAP AND LNF POINT FEATURE CLASS.  updateFeature&amp;amp;itemID=&amp;lt;your maps ID&amp;gt;&amp;amp;featureSourceURL=&amp;lt;link to the feature class to be edited&amp;gt;

var callback = {
  callback:"https://fieldmaps.arcgis.app/?referenceContext=open&amp;amp;itemID=08fdeaa4afdb4c75a82e417e98a0f4f1&amp;amp;featureSourceURL=https://services1.arcgis.com/ZGLt3tM6U3J8q1rO/arcgis/rest/services/Inventurpunkte/FeatureServer/0",

}

// // Add featureID (must be var fglobalid) portion of callback link
// THIS LINE MUST NOT BE CHANGED. This line is what tells the script which point in the feature class will be edited

var callbackid = "featureID=" + fglobalid


var callbackattribute = 'featureAttributes={"ConditionSurvey":"Complete"}'  // -- this would edit the ConditionSurvey field to reflect survey at the current point is complete


// Return the entire link/URL. This is what the FieldMaps app is following when you click the link to enter survey data. This should not be changed unless there is no callback
// attribute to pass back to Field Maps

return urlsource + UrlEncode(params) + "&amp;amp;" + "update=true&amp;amp;" + UrlEncode(callback) + "%26" + UrlEncode(callbackid) + "%26" + UrlEncode(callbackattribute)


// For use in the pop-up for your featureclass, simply enter the expression name in the link field (i.e. {expression/expr0})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 16:08:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1382259#M54777</guid>
      <dc:creator>Marcel_Schmidt</dc:creator>
      <dc:date>2024-02-14T16:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1382647#M54806</link>
      <description>&lt;P&gt;Thanks for the additional tips. I have no HTML knowledge so the seemingly more convoluted Arcade method works for me (eventually). Learning as I go though so may try the HTML option soon! Will amend the callback based on your suggestion.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 02:12:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1382647#M54806</guid>
      <dc:creator>LindsayRaabe_FPCWA</dc:creator>
      <dc:date>2024-02-15T02:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1397084#M55540</link>
      <description>&lt;P&gt;Hi Doug. I've just been playing around with the HTML code you posted and I have 2 queries.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Does this need the GlobalID info referenced somewhere as per the Arcade version to link the features?&lt;/P&gt;&lt;P data-unlink="true"&gt;2. Do you know how to format it to appear nicely in the popup&lt;/P&gt;&lt;P data-unlink="true"&gt;For Example;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;U&gt;My URL&lt;/U&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;instead of;&lt;/P&gt;&lt;P data-unlink="true"&gt;arcgis-survey123://?itemID=a587781fd350430cadec4&amp;amp;field:plantation=Grimwade&amp;amp;field:compartment=2&amp;amp;field:stand=65&amp;amp;field:year_planted=1995&amp;amp;field:species=P.RAD&amp;amp;field:tenure=State Forest / Timber Reserve&amp;amp;field:AR_Cat=State&amp;amp;callback=https://fieldmaps.arcgis.app&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 00:50:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1397084#M55540</guid>
      <dc:creator>LindsayRaabe_FPCWA</dc:creator>
      <dc:date>2024-03-18T00:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1397236#M55556</link>
      <description>&lt;P&gt;You use the custom popup and then the URL button like this.&amp;nbsp; This is Map Viewer Classic but same concept in new map viewer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CustomPopupURL.gif" style="width: 772px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98300i47F87333FCB05A5E/image-dimensions/772x409?v=v2" width="772" height="409" role="button" title="CustomPopupURL.gif" alt="CustomPopupURL.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I only create new features not edit.&amp;nbsp; To edit yes you would need the globalid also.&amp;nbsp; I think you can add this by using Arcade to just get the globlalid and add that to the URL using&amp;nbsp;{expression/expr0} notation.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do that a lot since I need to call from the child to the parent to get a number of fields I need that I then send to the form.&lt;/P&gt;&lt;P&gt;arcgis-survey123://?itemID=38e3353292dsfsdfsdfcb121a6&amp;amp;field:PointID={PointID}&amp;amp;field:EvaluationID={expression/expr0}&amp;amp;field:DesignLat={expression/expr6}&amp;amp;callback=&lt;A href="https://fieldmaps.arcgis.app" target="_blank"&gt;https://fieldmaps.arcgis.app&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Arcade I use for the lookup to the parent is this below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;DesignLat {expression/expr6}&lt;BR /&gt;var tbl = FeatureSetByRelationshipName($feature, "Points", ['DesignLat'], false);&lt;BR /&gt;return First(tbl).DesignLat&lt;/P&gt;&lt;P&gt;But I think for you if you are in the linking feature just&amp;nbsp;&lt;/P&gt;&lt;P&gt;return&amp;nbsp;$feature.GlobalID&amp;nbsp; &amp;nbsp;should work.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 13:53:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1397236#M55556</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2024-03-18T13:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1397597#M55576</link>
      <description>&lt;P&gt;Thanks for the info - I see you're still using MapViewer Classic. Will have to compare that to the MapViewer and see if it's the same. I've just figured out that the URL function in the popup text editor in MapViewer is setupt a bit differently in that it doesn't have 2 boxes (1 for text and 1 for the URL). Just type the text, highlight, click the URL button then enter the URL. It's the simple things that catch us out sometimes!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LindsayRaabe_FPCWA_0-1710808466676.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98382iCCC286CDB4D02CA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LindsayRaabe_FPCWA_0-1710808466676.png" alt="LindsayRaabe_FPCWA_0-1710808466676.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 00:34:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1397597#M55576</guid>
      <dc:creator>LindsayRaabe_FPCWA</dc:creator>
      <dc:date>2024-03-19T00:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1454012#M56812</link>
      <description>&lt;P&gt;I've just been working to implement this code in my URL using the full callback and feature update (edit) capabilities (previously was just calling the app and stopping there). I think I found a bug in the fglobalid variable assignment (Line 8). You're using:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;var fglobalid = Mid($feature.GlobalID, 1,36)&lt;/LI-CODE&gt;&lt;P&gt;but this seems to be trimming off the first character of the GlobalID value (index should start at 0 instead of 1?).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tidied it up though to simply be:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;var fglobalid = $feature.GlobalID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Curious to know why you didn't do this in the first case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 03:02:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1454012#M56812</guid>
      <dc:creator>LindsayRaabe_FPCWA</dc:creator>
      <dc:date>2024-05-13T03:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1454649#M56813</link>
      <description>&lt;P&gt;Post edited after I sorted out most of my own issues by undoing other supposed "fixes" (see comments above about the MID function and globalID's).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have managed to get my code working almost perfectly now. The only spot that I was getting stuck at and for which I've implemented a workaround, is passing back a date value to Field Maps instead of a text value to update the selected features attribute as done (instead of saying "Complete", it states when it was completed). Breif explanation of my code below, as I've extended it to use multiple fields from the source feature.&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The source (launching) feature in Field Maps has multiple fields which are checked to see at what "stage" an inspection process is up to (happens at various stages over 2 years). These are checked to find the first empty value and that is used to populate the type of inspection being done.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;This value is also used to then determine which date (now text) field should be edited upon callback to show that the corresponding inspection has been completed.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The selected features centroid coordinates are also returned and converted into Lat/Long and passed as a parameter to Survey123 for the geopoint location.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I couldn't for the life of me though figure out how to get the updateFeature section (Line 80) to work with a date value/field in Field Maps. I've change the fields to text and have now passed a string formatted as&amp;nbsp;"my_username @ 2024-05-14 09:59 17.510" (Lines 45-47):&lt;/P&gt;&lt;P&gt;Below is the full code I have implemented.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;// Calculate inspection number

var Inspection = IIF(IsEmpty($feature.insp_2_weeks)==True,"2 weeks",
IIF(IsEmpty($feature.insp_4_weeks)==True,"4 weeks",
IIF(IsEmpty($feature.insp_6_weeks)==True,"6 weeks",
IIF(IsEmpty($feature.insp_8_weeks)==True,"8 weeks",
IIF(IsEmpty($feature.insp_10_weeks)==True,"10 weeks",
IIF(IsEmpty($feature.insp_12_weeks)==True,"12 weeks",
IIF(IsEmpty($feature.insp_4_months)==True,"4 months",
IIF(IsEmpty($feature.insp_5_months)==True,"5 months",
IIF(IsEmpty($feature.insp_6_months)==True,"6 months",
IIF(IsEmpty($feature.insp_9_months)==True,"9 months",
IIF(IsEmpty($feature.insp_12_months)==True,"12 months",
IIF(IsEmpty($feature.insp_15_months)==True,"15 months",
IIF(IsEmpty($feature.insp_18_months)==True,"18 months",
IIF(IsEmpty($feature.insp_21_months)==True,"21 months","24 months"))))))))))))))

// Get matching inspection number field name

var InspFieldName = IIF(Inspection=="2 weeks","insp_2_weeks",
IIF(Inspection=="4 weeks","insp_4_weeks",
IIF(Inspection=="6 weeks","insp_6_weeks",
IIF(Inspection=="8 weeks","insp_8_weeks",
IIF(Inspection=="10 weeks","insp_10_weeks",
IIF(Inspection=="12 weeks","insp_12_weeks",
IIF(Inspection=="4 months","insp_4_months",
IIF(Inspection=="5 months","insp_5_months",
IIF(Inspection=="6 months","insp_6_months",
IIF(Inspection=="9 months","insp_9_months",
IIF(Inspection=="12 months","insp_12_months",
IIF(Inspection=="15 months","insp_15_months",
IIF(Inspection=="18 months","insp_18_months",
IIF(Inspection=="21 months","insp_21_months","insp_24_months"))))))))))))))

// Get centroid Lat and Long

var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (Centroid($feature).X / originShift) * 180.0;

var lat = (Centroid($feature).Y / originShift) * 180.0;
lat = 180.0 / PI * (2.0 * Atan( Exp(lat * PI / 180.0)) - PI / 2.0);

// Generate callback attribute

var user = GetUser($layer).username
var date = left(Date(),10)
var cbvalue = user + " on " + date

// Source: https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/td-p/1306591

// To launch survey123 from map
// EDIT THIS LINK TO MATCH YOUR SURVEY LINK (Only edit AFTER itemID= and BEFORE &amp;amp;

var urlsource ="arcgis-survey123://?itemID=b40c1e4d99084cbca8170ff273c74977&amp;amp;"
 
//Format globalid to "link" survey point to map data  -- MUST have globalid field for this script to work. DO NOT EDIT THIS LINE

var fglobalid = Mid($feature.GlobalID, 1,36)

//Generate other url parameters to pass to survey123. -- These are the values you wish to transfer from Field Maps to your Survey123 form.
// Edit or delete fields as necessary. The line containing $feature.GlobalID MUST NOT BE REMOVED, but the field to the left of $feature.GlobalID may
// be changed to reflect the field in your Survey to store the GlobalID.

var params = {
  "field:plantation": $feature.Plantation,
  "field:years_planted": $feature.PlantingYear,  
  "field:tree_species": $feature.Species,  
  "field:tenure": $feature.RENDER_LABEL, 
  "field:inspection_number": Inspection, 
};

// Get map center coordinates

var center = concatenate([lat,lon],",")

// Create callback portion of link using itemID (map ID) and featureSourceURL (services link to the layer containing the feature to be edited following survey submission)
// EDIT THIS LINK FOR MAP AND FEATURE SERVICE.  updateFeature&amp;amp;itemID=&amp;lt;your maps ID&amp;gt;&amp;amp;featureSourceURL=&amp;lt;link to the feature class to be edited&amp;gt;

var callback = {
  callback:"https://fieldmaps.arcgis.app/?referenceContext=updateFeature&amp;amp;itemID=##############&amp;amp;featureSourceURL=https://services3.arcgis.com/############/arcgis/rest/services/#################/FeatureServer/0",
//var callback = {callback:"https://fieldmaps.arcgis.app",

}

// // Add featureID (must be var fglobalid) portion of callback link
// THIS LINE MUST NOT BE CHANGED. This line is what tells the script which point in the feature class will be edited

var callbackid = "featureID=" + fglobalid

var callbackattribute = 'featureAttributes={"' + InspFieldName + '":"' + cbvalue + '"}'


// Return the entire link/URL. This is what the FieldMaps app is following when you click the link to enter survey data. This should not be changed unless there is no callback
// attribute to pass back to Field Maps

/// return urlsource + UrlEncode(params) + "&amp;amp;" + UrlEncode(callback) + "%26" + UrlEncode(callbackid) + "%26" + UrlEncode(callbackattribute)
return urlsource + UrlEncode(params) + "&amp;amp;center=" + UrlEncode(center) + "&amp;amp;" + UrlEncode(callback) + "%26" + UrlEncode(callbackid) + "%26" + UrlEncode(callbackattribute)

// For use in the pop-up for your featureclass, simply enter the expression name in the link field (i.e. {expression/expr0})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 03:06:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1454649#M56813</guid>
      <dc:creator>LindsayRaabe_FPCWA</dc:creator>
      <dc:date>2024-05-14T03:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Survey123 link from Field Maps with callback to Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1455606#M56814</link>
      <description>&lt;P&gt;Thank you for the Reply,&lt;/P&gt;&lt;P&gt;when I use this line:&lt;/P&gt;&lt;PRE&gt;var fglobalid = $feature.GlobalID&lt;/PRE&gt;&lt;P&gt;I get the globalID with the curly brackets as output, for expamle: {r892e0hj-2h98h23h-8934610n-q32n1751}.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this reason I have to trimm of the first and last charakter of the globalID to get the number without the curly brackets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Marcel Schmidt&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 07:22:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/help-with-survey123-link-from-field-maps-with/m-p/1455606#M56814</guid>
      <dc:creator>Marcel_Schmidt</dc:creator>
      <dc:date>2024-05-13T07:22:38Z</dc:date>
    </item>
  </channel>
</rss>

