<?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: Custom URL and the &amp;center function in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/1325009#M51522</link>
    <description>&lt;P&gt;hello were you able to get a solution to your question? I'm having the same trouble with a project of mine i was wondering if you or anyone here could help out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://survey123.arcgis.com/share/a7ed8daa7bd64a3399504972d6a545cb?field:cb_id={GIS_ID}&amp;amp;field:cb_address={NEAREST_FULLADDR}&amp;amp;field:cb_long={Easting}&amp;amp;field:cb_lat={Northing}&amp;amp;center={Northing},{Easting}" target="_blank"&gt;https://survey123.arcgis.com/share/a7ed8daa7bd64a3399504972d6a545cb?field:cb_id={GIS_ID}&amp;amp;field:cb_address={NEAREST_FULLADDR}&amp;amp;field:cb_long={Easting}&amp;amp;field:cb_lat={Northing}&amp;amp;center={Northing},{Easting}&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my current link... i am retrieving the lat and long data from a online map of catch basins and populating the respective fields in survey123 "cb_lat" and "cb_long" and pulling that data into the geopoint question in s123 using formula below:&lt;/P&gt;&lt;TABLE width="272"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="272"&gt;pulldata("@geopoint", ${cb_lat}, ${cb_long})&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far its auto-populating the fields correctly but i cant get the map to pull up in the right spot even with the coordinates being pushed through. Any advice or help is much appreciated.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2023 22:44:13 GMT</pubDate>
    <dc:creator>OscarGaleas</dc:creator>
    <dc:date>2023-09-01T22:44:13Z</dc:date>
    <item>
      <title>Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880435#M30454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have several surveys that receive pass-through attribute information from existing features on other layers. All of the attribute information is populating in Survey123 perfectly well, but I can't get the &amp;amp;center function to work. I either get a point off the west coast of Africa or one right where the survey was submitted. Never on top of the existing feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using Survey123 Connect version 3.7.62 and ArcGIS Enterprise/Portal 10.6.1. Before migrating to Enterprise, this&amp;nbsp;process worked very well in ArcGIS Online.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example of my custom URL:&amp;nbsp;&lt;/P&gt;&lt;P&gt;arcgis-survey123://?itemID=xxxxxxxxxxxx&amp;amp;field:Comments={maplocation}&amp;amp;field:Date={installdate}&amp;amp;center={expression/expr0},{expression/expr1}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expr0:&lt;/P&gt;&lt;P&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;/P&gt;&lt;P&gt;var lon = (Geometry($feature).x / originShift) * 180.0;&lt;BR /&gt;var lat = (Geometry($feature).y / originShift) * 180.0;&lt;/P&gt;&lt;P&gt;lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);&lt;BR /&gt;return lon;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expr1:&lt;/P&gt;&lt;P&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;/P&gt;&lt;P&gt;var lon = (Geometry($feature).x / originShift) * 180.0;&lt;BR /&gt;var lat = (Geometry($feature).y / originShift) * 180.0;&lt;/P&gt;&lt;P&gt;lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);&lt;BR /&gt;return lat;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2020 20:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880435#M30454</guid>
      <dc:creator>AprilChipman</dc:creator>
      <dc:date>2020-05-04T20:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880436#M30455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi April,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to check, which locale/language are your devices in? &amp;nbsp;We will be releasing an update to the field application to address issues that have been raised in decimal comma locales (i.e., French, Nederlands).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What client are you viewing the link in (Collector, Explorer, Web Map Viewer)? &amp;nbsp;It sounds like we would need to raise an issue with that application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2020 17:13:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880436#M30455</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2020-05-06T17:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880437#M30456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply, James!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am in the US and using the English language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The link is commonly used in Collector, but I'm starting to get reasons to use them in webapps and dashboards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I found this other thread:&amp;nbsp;&lt;A href="https://community.esri.com/thread/250642"&gt;Can't pass attributes of a line from Collector to S123&lt;/A&gt;&amp;nbsp; &amp;nbsp;and was able to use a different version of the Arcade expression to get the center function to work, but only in individual layers. If I have a service with several layers, the expression throws an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expression that works to get the x,y location of existing points for Survey123:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;function LatLon(x, y) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;var lon = (Geometry($feature).x);&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;var lat = (Geometry($feature).y);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;return [lat, lon];&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;}&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;function CreateURLSurvey(lat, lon) {&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;var url = lat + "," + lon;// This is the line that defines the location&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Console(url);&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;return url;&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;var latlon = LatLon(Geometry($feature).X, Geometry($feature).Y);&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;var url = CreateURLSurvey(latlon[0], latlon[1]);&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;return url;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2020 18:57:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880437#M30456</guid>
      <dc:creator>AprilChipman</dc:creator>
      <dc:date>2020-05-06T18:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880438#M30457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a similar issue. I have a link in a web map popup that was working a few weeks ago. When I revisited that project this week, the link is no longer pulling the custom URL scheme correctly. The map and dashboard the link is included in are published to ArcGIS Online.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The URL Scheme matches the recommended formatting, although it's not pulling into the survey form. The map is centering on current location instead of the parameters passed in the URL scheme. This is the case on Android and Apple devices, although if I launch S123 from a Chrome browser on my desktop, the parameters are passed correctly.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="328" src="https://community.esri.com/legacyfs/online/502478_pastedImage_2.png" width="350" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my HTML as well as the URL that launches S123 from the Dashboard:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href="arcgis-survey123://?itemID=14fcceaf30084ace8c3345efc006469b&amp;amp;amp;field:Address={Address}&amp;amp;amp;field:OccType={OccType}&amp;amp;amp;field:BusName={BusName}&amp;amp;amp;field:BusType={BusType}&amp;amp;amp;field:InspType=102&amp;amp;amp;center={LAT},{LON}" rel="nofollow ugc" target="_blank"&amp;gt;Complete Reinspection&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcgis-survey123://?itemID=14fcceaf30084ace8c3345efc006469b&amp;amp;field:Address={Address}&amp;amp;field:OccType={OccType}&amp;amp;field:BusName={BusName}&amp;amp;field:BusType={BusType}&amp;amp;field:InspType=102&amp;amp;center={LAT},{LON}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 18:39:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880438#M30457</guid>
      <dc:creator>BenBaker1</dc:creator>
      <dc:date>2020-08-05T18:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880439#M30458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather than manually typing your URL, you should use&amp;nbsp;the &lt;A href="https://developers.arcgis.com/arcade/function-reference/text_functions/#urlencode"&gt;Arcade UrlEncode() function to construct the URL&lt;/A&gt; - this will ensure the proper number format is used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2020 23:08:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880439#M30458</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2020-08-07T23:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880440#M30459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, &lt;A href="https://community.esri.com/migrated-users/3263" target="_blank"&gt;James Tedrick&lt;/A&gt;. I've been testing&amp;nbsp;this function but am&amp;nbsp;not familiar with how to pass field parameters (from the attributes or other Arcade expressions). I finally settled on the following, although if there's a way to set up each field parameter with the &lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&lt;EM&gt;params&lt;/EM&gt;&lt;/SPAN&gt; variable, I'd be interested to&amp;nbsp;try it out.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Var urlsource &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'arcgis-survey123://?'&lt;/SPAN&gt;
   
var originShift &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6378137.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
var lon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Geometry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;x &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; originShift&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
var lat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Geometry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;y &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; originShift&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
lat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Atan&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Exp&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; lat &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
var centerpoint&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Round&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lat&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;','&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Round&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lon&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

Var params &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
	itemID&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'14fcceaf30084ace8c3345efc006469b'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    center&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; centerpoint
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
Return urlsource &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; UrlEncode &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;params&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;amp;field:Address={Address}&amp;amp;field:OccType={OccType}&amp;amp;field:BusName={BusName}&amp;amp;field:BusType={BusType}&amp;amp;field:InspType=102'&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:06:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880440#M30459</guid>
      <dc:creator>BenBaker1</dc:creator>
      <dc:date>2021-12-12T11:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880441#M30460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I spoke too soon. The code above is passing the field parameters dynamically, but the centerpoint variable is pulling the same lat/lon for every point in the popup instead of from each feature. When I changed the expression to what is shown below, the Lat/Lon is changing for the respective point I select, but&amp;nbsp;now the field parameters are 'hard coded' into the URL and are not pulling the attributes. I think I'm missing something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Var urlsource &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'arcgis-survey123://?'&lt;/SPAN&gt;

function MetersToLatLon&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mx&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; my&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt; Converts XY point &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; Spherical Mercator EPSG&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;900913&lt;/SPAN&gt; to lat&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;lon &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; WGS84 Datum
     &lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt; Fuente&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; http&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt;www&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;maptiler&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;org&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;google&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;maps&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;coordinates&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;tile&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;bounds&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;projection&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;
    var originShift &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6378137.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

    var lon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mx &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; originShift&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    var lat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;my &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; originShift&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

    lat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; Atan&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; Exp&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; lat &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;lat&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lon&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;


var poly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Geometry&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

var result1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;!IsEmpty&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;poly&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    var pnt_centr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Centroid&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;poly&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

    var latlon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MetersToLatLon&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pnt_centr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pnt_centr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;y&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

    result1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;  Round&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;latlon&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    result1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

function MetersToLatLon&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mx&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; my&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt; Converts XY point &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; Spherical Mercator EPSG&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;900913&lt;/SPAN&gt; to lat&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;lon &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; WGS84 Datum
    &lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt; Fuente&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; http&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt;www&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;maptiler&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;org&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;google&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;maps&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;coordinates&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;tile&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;bounds&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;projection&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;
    var originShift &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6378137.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

    var lon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mx &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; originShift&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    var lat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;my &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; originShift&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

    lat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; Atan&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; Exp&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; lat &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; PI &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;lat&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lon&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;


var poly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Geometry&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

var result2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;!IsEmpty&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;poly&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    var pnt_centr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Centroid&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;poly&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

    var latlon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MetersToLatLon&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pnt_centr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pnt_centr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;y&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

    result2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;  Round&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;latlon&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    result2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;


&lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; result1&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; result2&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

var centerpoint &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; result1 &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;','&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; result2

Var params &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
	itemID&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'14fcceaf30084ace8c3345efc006469b'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    center&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; centerpoint
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
Return urlsource &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; UrlEncode &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;params&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;amp;field:Address={Address}&amp;amp;field:OccType={OccType}&amp;amp;field:BusName={BusName}&amp;amp;field:BusType={BusType}&amp;amp;field:InspType=102'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/503314_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:06:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/880441#M30460</guid>
      <dc:creator>BenBaker1</dc:creator>
      <dc:date>2021-12-12T11:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/1290615#M49356</link>
      <description>&lt;P&gt;Any update on this topic? I am pairing a field maps app with Survey123. I have configured custom pop-ups in Map Viewer classic so when a field worker opens the field maps app &amp;amp; clicks a location they can launch a survey for that feature. I am able to pass the location name&amp;nbsp;but am struggling to pass the coordinates from the feature service to the survey. My survey test points keep appearing at my current location rather than the location of the feature. My custom Url looks like this:&lt;/P&gt;&lt;P&gt;arcgis-survey123://?itemID= 40852746f5bb43478bae2dbb6axxxxxx&amp;amp;field:location={expression/expr0}&amp;amp;center={Expression/Expr1},{Expression/Expr2}&amp;amp;callback=&lt;A href="https://fieldmaps.arcgis.app" target="_blank" rel="noopener"&gt;https://fieldmaps.arcgis.app&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here are my expressions:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expression/expr0:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Proper($feature.POI_NAME)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expression/expr1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var lon = (Geometry($feature).x);&lt;BR /&gt;return lon&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expression/expr2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var lat = (Geometry($feature).y);&lt;BR /&gt;return lat&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 14:23:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/1290615#M49356</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-05-18T14:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/1296716#M49766</link>
      <description>&lt;P&gt;All:&lt;/P&gt;&lt;P&gt;I have been experiencing the same issues described in this thread: trying to create an attribute expression that calculates lat/long coordinates from a hosted feature layer, then integrate Field Maps with Survey123 to open a form and have the geopoint plot the submitted survey on top of the feature using the result of the attribute expression using a custom URL via the custom URL popup (&amp;amp;center=).&lt;/P&gt;&lt;P&gt;I have been using the "&lt;STRONG&gt;Expression/expr2 - Code to calculate geometry"&amp;nbsp;&lt;/STRONG&gt;formula called out in this post (and a multitude of others on the community page) and it was correctly calculating the coordinates in ArcGIS Online Web Viewer Classic, but then when we tested this functionality in the field, the point was not mapping.&lt;/P&gt;&lt;P&gt;I found that the original formula in the "&lt;STRONG&gt;Expression/expr2 - Code to calculate geometry"&amp;nbsp;&lt;/STRONG&gt;results in an&amp;nbsp;&lt;EM&gt;Array&lt;/EM&gt; data type, with associated brackets. These brackets do not show up in ArcGIS Online, but when you view the popup in Field Maps, you can see the brackets. So because of this, i tested further and in the original function, i removed the brackets in the result line, which worked but was not perfect. It was not perfect because the coordinate results ended up being truncated to 2 decimals, and even though the submitted form was executing, the point was being plotted hundred of feet away.&lt;/P&gt;&lt;P&gt;After 10 hours of testing and researching these threads (which by the way, all of the contributions are EXPONENTIALLY HELPFUL AND I AM SO GRATEFUL OF YOUR KNOWLEDGE) i was able to find the CORRECT SOLUTION:&lt;/P&gt;&lt;P&gt;1.) Create an attribute expression for latitude:&lt;/P&gt;&lt;P&gt;var lat;&lt;BR /&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;/P&gt;&lt;P&gt;lat = number(Geometry($feature).y / originShift) * 180.0;&lt;BR /&gt;lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);&lt;BR /&gt;return lat;&lt;/P&gt;&lt;P&gt;2.) Create an attribute expression for longitude:&lt;/P&gt;&lt;P&gt;var lon;&lt;BR /&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;/P&gt;&lt;P&gt;lon = number(Geometry($feature).x / originShift) * 180.0;&lt;BR /&gt;return lon;&lt;/P&gt;&lt;P&gt;3.) Because of the "number" identifier, In ArcGIS Online Web Map Viewer Classic go to Configure Popups, make sure your pop up display is custom, then the important step is to click &lt;STRONG&gt;Configure Attributes&lt;/STRONG&gt;. Navigate to the newly created expressions and expand the decimal places to a minimum of 5.&lt;/P&gt;&lt;P&gt;4.) Lastly, in the custom URL make the "&amp;amp;center={expression/expr3},{expression/expr4}&amp;nbsp;&lt;EM&gt;where expr 3 is Lat and expr 4 is Long.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I have been testing since i discovered this and it has been running smoothly. Happy Mapping!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 15:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/1296716#M49766</guid>
      <dc:creator>JoshConrad1</dc:creator>
      <dc:date>2023-06-07T15:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom URL and the &amp;center function</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/1325009#M51522</link>
      <description>&lt;P&gt;hello were you able to get a solution to your question? I'm having the same trouble with a project of mine i was wondering if you or anyone here could help out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://survey123.arcgis.com/share/a7ed8daa7bd64a3399504972d6a545cb?field:cb_id={GIS_ID}&amp;amp;field:cb_address={NEAREST_FULLADDR}&amp;amp;field:cb_long={Easting}&amp;amp;field:cb_lat={Northing}&amp;amp;center={Northing},{Easting}" target="_blank"&gt;https://survey123.arcgis.com/share/a7ed8daa7bd64a3399504972d6a545cb?field:cb_id={GIS_ID}&amp;amp;field:cb_address={NEAREST_FULLADDR}&amp;amp;field:cb_long={Easting}&amp;amp;field:cb_lat={Northing}&amp;amp;center={Northing},{Easting}&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my current link... i am retrieving the lat and long data from a online map of catch basins and populating the respective fields in survey123 "cb_lat" and "cb_long" and pulling that data into the geopoint question in s123 using formula below:&lt;/P&gt;&lt;TABLE width="272"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="272"&gt;pulldata("@geopoint", ${cb_lat}, ${cb_long})&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far its auto-populating the fields correctly but i cant get the map to pull up in the right spot even with the coordinates being pushed through. Any advice or help is much appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 22:44:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/custom-url-and-the-center-function/m-p/1325009#M51522</guid>
      <dc:creator>OscarGaleas</dc:creator>
      <dc:date>2023-09-01T22:44:13Z</dc:date>
    </item>
  </channel>
</rss>

