<?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: Can't pass attributes of a line from Collector to S123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1118503#M38743</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/4925"&gt;@BrettStokes&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Just went through the workflow for the polygon example, and worked perfectly in Map Viewer Classic, though not in Map Viewer. The expression gives the same result when testing in both, though the URL does not work correctly in Map Viewer. In the pop-up, all coordinates are displayed, and only the first latitude value is passed to Survey123.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="PassPolyStrToSurvey123.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27879i2E00D4BFF30102BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="PassPolyStrToSurvey123.png" alt="PassPolyStrToSurvey123.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Jamie.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Nov 2021 09:04:28 GMT</pubDate>
    <dc:creator>JamieLambert</dc:creator>
    <dc:date>2021-11-19T09:04:28Z</dc:date>
    <item>
      <title>Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782103#M6325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-weight: 400;"&gt;Basically here is the worflow:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-weight: 400;"&gt;From collector app, select one of the lines (see 1st screenshot). In the&amp;nbsp;pop out&amp;nbsp;window from collector there is a link that will open a survey in S123. Once the app is open, in the survey there are attributes passed from Collector but doesn't fill out the "Polyline" (see 2nd screenshot). It's possible&amp;nbsp;to "pass" the line attribute from Collector to the "Polyline" in S123? I just put it like a "geotrace", but basically what I want is to "draw" that geotrace line from collector to s123.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-weight: 400;"&gt;&lt;IMG alt="collector" class="image-2 jive-image" height="384" src="https://community.esri.com/legacyfs/online/486760_collector.jpg" style="border: 0px; font-weight: inherit; margin: 2px 20px 0px;" width="215" /&gt;&lt;IMG alt="Survey123 for" class="image-1 jive-image" height="390" src="https://community.esri.com/legacyfs/online/486797_s123.jpg" style="border: 0px; font-weight: inherit; margin: 2px 20px 0px;" width="219" /&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-weight: 400;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-weight: 400;"&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2020 17:05:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782103#M6325</guid>
      <dc:creator>CesarAvila</dc:creator>
      <dc:date>2020-03-30T17:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782104#M6326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cesar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is certainly possible using an Arcade expression. Here are some detailed instructions on setting this up (the example is using a polygon but the steps are the same). This hasn't quite made it into a blog yet..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;Pre-populate a Survey123 form with Existing Feature Layer Line/Polygon geometry via Custom URL&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Survey123 version 3.6+, line and polygon geometry capture is available via the `geotrace` and `geoshape` question types. You may be familiar with calculating geopoint questions which requires a set of text in the format `&amp;lt;LAT&amp;gt; &amp;lt;LON&amp;gt;`. Geotrace and Geoshape questions both extend this format to support a sequence of points; the format is `&amp;lt;LAT1&amp;gt; &amp;lt;LON1&amp;gt;;&amp;lt;LAT2&amp;gt; &amp;lt;LON2&amp;gt;;&amp;lt;LAT3&amp;gt; &amp;lt;LON3&amp;gt;;...`.&amp;nbsp; A polygon will automatically close (create a segment from the last point to the first point).&amp;nbsp; We can create an Arcade expression to calculate this sequence from the geometry of a line/polygon feature:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline; "&gt;Line&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;var geom = Geometry($feature);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;var outparts = [];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;var counter = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;for (var p in geom.paths){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var thispath = geom.paths&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var pt in thispath){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var ptstr = Concatenate(thispath[pt].y, " ", thispath[pt].x);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outparts[counter]= ptstr;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter = counter + 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt;"&gt;Return Concatenate(outparts, ";")&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline; "&gt;Polygon&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;var geom = Geometry($feature);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;var firstpart = geom.rings[0];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;var outparts = [];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;var counter = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;for (var pt in firstpart){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var ptstr = Concatenate(firstpart[pt].y, " ", firstpart[pt].x);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outparts[counter]= ptstr;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter = counter + 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; color: blue;"&gt;return Concatenate(outparts, ";")&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;This allows us to pass the geometry into Survey123 to pre-populate the geotrace/geoshape question via a custom URL.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="text-decoration: underline; "&gt;Steps&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;1) Open your web map to configure the pop-up for your polygon layer. *Note that for Survey123 to read the coordinates properly, the map must be in WGS84 (SRID 4326) projection.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2) Add a new Attribute Expression.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;3) Copy/paste the Arcade expression (blue text above) into the Expression dialog and click OK (I'm using the polygon expression in this example):&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/488705_pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;4) You should now see your attribute expression in the list (I renamed mine to ‘Shape as Text’):&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/488706_pastedImage_5.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;5) Construct your custom URL (to add as a link in the pop-up) using the 'field:&amp;lt;question_name&amp;gt;={field_name}' syntax to set the value of the geoshape question.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm .0001pt 18.0pt;"&gt;See the &lt;A _jive_internal="true" href="https://community.esri.com/groups/survey123/blog/2016/07/30/understanding-survey123s-custom-url-scheme"&gt;Understanding Survey123's custom URL Scheme&lt;/A&gt; blog post for more details on where to find your itemID etc.&lt;/P&gt;&lt;P style="margin: 0cm 0cm .0001pt 18.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm .0001pt 18.0pt;"&gt;Here is an example URL that passes values for 5 attribute fields plus the geometry field (also the geoshape question name highlighted in yellow):&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm .0001pt 18.0pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;arcgis-survey123://?itemID=7bf73e2a957a4d1c8ce899771af0db3e&amp;amp;field:PARCEL_PFI={PARCEL_PFI}&amp;amp;field:PARCEL_SPI={PARCEL_SPI}&amp;amp;field:PC_PLANNO={PC_PLANNO}&amp;amp;field:PC_LOTNO={PC_LOTNO}&amp;amp;field:extra_comments={extra_comments}&amp;amp;&lt;SPAN style="background: yellow;"&gt;field:Parcel_polygon={expression/expr0}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm .0001pt 18.0pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;6) Change your ‘Pop-up Contents’ to display a custom attribute, then click ‘Configure’:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/488707_pastedImage_11.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;7) Add some text (eg ‘Launch Survey’) to use as your link and copy / paste in your custom URL:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;IMG class="jive-image image-4" src="https://community.esri.com/legacyfs/online/488708_pastedImage_13.png" /&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Click OK to close the ‘Configure Pop-up’ and save your webmap.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;You should now be able to click on a polygon to see the pop-up and then follow the link to launch the survey. The survey form will pre-populate with the geometry and attribute values you included in your URL:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;IMG class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/488709_pastedImage_14.png" /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;IMG class="image-6 jive-image" src="https://community.esri.com/legacyfs/online/488710_pastedImage_15.png" /&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="text-decoration: underline; "&gt;Limitations&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;1) Note that for Survey123 to read the coordinates properly, the map must be in WGS84 (SRID 4326) projection. Esri offers a number of basemaps in this projection.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2)&amp;nbsp;The line script assembles multiple parts into a single-part geometry.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;3) The polygon arcade expression only uses the first part of the shape; this will not include 'donut holes' in polygons, multipart etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2020 05:23:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782104#M6326</guid>
      <dc:creator>BrettStokes</dc:creator>
      <dc:date>2020-04-15T05:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782105#M6327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This post was so very helpful! Thank you!!&amp;nbsp; I am still having problems getting my survey points to center on points from existing layers. They keep showing up on the west coast of Africa!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there something wrong with my URL or attribute expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcgis-survey123://?itemID=xxxxxxx&amp;amp;field:comments={wmMapName}&amp;amp;field:stormpoint={expression/expr0},{expression/expr1}&lt;/P&gt;&lt;P&gt;(This one put the point where I was standing, not over the existing feature.)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcgis-survey123://?itemID=&lt;/SPAN&gt;&lt;SPAN&gt;xxxxxxx&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;field:comments={wmMapName}&amp;amp;center={expression/expr0},{expression/expr1}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(This one put the point off the west coast of Africa.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Attribute Expression for Longitude (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;BR /&gt;'Attribute Expression for Latitude (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;P&gt;&lt;/P&gt;&lt;P&gt;I tested the points and lines on the same webmap with layers from the same existing feature service. Obviously, I used two different surveys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2020 19:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782105#M6327</guid>
      <dc:creator>AprilChipman</dc:creator>
      <dc:date>2020-05-05T19:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782106#M6328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this arcade expression for the points:&lt;/P&gt;&lt;P&gt;function LatLon(x, y) {&lt;BR /&gt; &lt;BR /&gt; var lon = (Geometry($feature).x);&lt;BR /&gt; var lat = (Geometry($feature).y);&lt;BR /&gt; &lt;BR /&gt; return [lat, lon];&lt;BR /&gt;}&lt;BR /&gt;function CreateURLSurvey(lat, lon) {&lt;BR /&gt; var url = lat + "," + lon;// This is the line that defines the location&lt;BR /&gt; Console(url);&lt;BR /&gt; return url;&lt;BR /&gt;}&lt;BR /&gt; &lt;BR /&gt;var latlon = LatLon(Geometry($feature).X, Geometry($feature).Y);&lt;BR /&gt;var url = CreateURLSurvey(latlon[0], latlon[1]);&lt;BR /&gt;return url;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that, your URL need to have "&amp;amp;center=" followed by the expression name.&lt;/P&gt;&lt;P&gt;example: arcgis-survey123://?itemID=d6b57a44f78d4c5388f4a82a6d208c89&amp;amp;center={expression/expr0}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2020 20:06:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782106#M6328</guid>
      <dc:creator>CesarAvila</dc:creator>
      <dc:date>2020-05-05T20:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782107#M6329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Cesar!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This appears to have worked in my testing maps and layers - now to put it into the in-use versions!&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have a solution or any further news on being able to use a script like this on a layer inside a feature service with many layers? When I try to add the Attribute Expression, I get "Runtime Error: Cannot call member method on null." My workaround is to individually add all the layers that I need to use with Survey123, but that certainly gets cumbersome for both administrators and end-users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also got some use cases for the lines and polygons being populated from existing features. I'm adding those to my 'To Do' list now!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2020 21:28:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/782107#M6329</guid>
      <dc:creator>AprilChipman</dc:creator>
      <dc:date>2020-05-05T21:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1058081#M34613</link>
      <description>&lt;P&gt;Thanks for posting this Brett. I'm getting an error when testing the "Lines" code:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="text-red"&gt;Execution Error:&lt;/SPAN&gt;&lt;SPAN&gt;Runtime Error: Cannot call member property on object of this type. y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any idea on why this would be and how to fix? Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 16:05:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1058081#M34613</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-05-14T16:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1084003#M36179</link>
      <description>&lt;P&gt;Matt, did you every get a solution for the "&lt;SPAN class="text-red"&gt;Execution Error:&lt;/SPAN&gt;&lt;SPAN&gt;Runtime Error: Cannot call member property on object of this type. y"? I am encountering the same issue with the passing polyline geometry to a Survey123 survey.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Todd&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 15:15:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1084003#M36179</guid>
      <dc:creator>ToddHelt</dc:creator>
      <dc:date>2021-07-29T15:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1084891#M36260</link>
      <description>&lt;P&gt;Yes. Here is the Arcade expression I am using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var paths = Geometry($feature).paths;
var originShift = 2.0 * PI * 6378137.0 / 2.0;
var outparts = [];
var counter = 0;
var thispath = paths[0];
    for (var pt in thispath){
        var lat = (thispath[pt].y / originShift) * 180.0;
        lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);
        var lon = (thispath[pt].x / originShift) * 180.0;
        var ptstr = Concatenate(lat, " ", lon);
        outparts[counter]= ptstr;
        counter = counter + 1;
    }  
Return Concatenate(outparts, ";")&lt;/LI-CODE&gt;&lt;P&gt;arcgis-survey123://?itemID=YOURITEMID&amp;amp;field:LINE={expression/expr0}&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 13:32:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1084891#M36260</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-08-02T13:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1086638#M36354</link>
      <description>&lt;P&gt;Awesome Matt, that worked like a charm, thanks so much for sharing!&lt;/P&gt;&lt;P&gt;Todd&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 15:43:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1086638#M36354</guid>
      <dc:creator>ToddHelt</dc:creator>
      <dc:date>2021-08-06T15:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1118448#M38738</link>
      <description>&lt;P&gt;This one worked for me - thanks for sharing Matt!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 23:31:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1118448#M38738</guid>
      <dc:creator>JamieLambert</dc:creator>
      <dc:date>2021-11-18T23:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1118503#M38743</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/4925"&gt;@BrettStokes&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Just went through the workflow for the polygon example, and worked perfectly in Map Viewer Classic, though not in Map Viewer. The expression gives the same result when testing in both, though the URL does not work correctly in Map Viewer. In the pop-up, all coordinates are displayed, and only the first latitude value is passed to Survey123.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="PassPolyStrToSurvey123.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27879i2E00D4BFF30102BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="PassPolyStrToSurvey123.png" alt="PassPolyStrToSurvey123.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Jamie.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 09:04:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1118503#M38743</guid>
      <dc:creator>JamieLambert</dc:creator>
      <dc:date>2021-11-19T09:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1216260#M44998</link>
      <description>&lt;P&gt;Matt when I run this lines it works perfectly, any chance you have done this for Polygons?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 19:27:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1216260#M44998</guid>
      <dc:creator>MEGAAdmin_E</dc:creator>
      <dc:date>2022-09-26T19:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can't pass attributes of a line from Collector to S123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1221054#M45272</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/4925"&gt;@BrettStokes&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/429152"&gt;@MEGAAdmin_E&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/228192"&gt;@JamieLambert&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I'm also struggling with using this code for polygons. When I follow Brett's polygon code it successfully links to Survey123, but the resulting geometry is simply a line (pictured). I also tried nesting his code inside a urlencode snippet...&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var geom = Geometry($feature);

var firstpart = geom.rings[0];

var outparts = [];

var counter = 0;

for (var pt in firstpart){

    var ptstr = Concatenate(firstpart[pt].y, " ", firstpart[pt].x);

    outparts[counter]= ptstr;

    counter = counter + 1;   

}

var result = Concatenate(outparts, ";")
return UrlEncode(result);&lt;/LI-CODE&gt;&lt;P&gt;but this resulted in no geometry making its way into Survey123 at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use of MapView or MapViewer Classic doesn't make any difference.&lt;/P&gt;&lt;P&gt;Would love to make some progress on this! Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 12:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-t-pass-attributes-of-a-line-from-collector-to/m-p/1221054#M45272</guid>
      <dc:creator>HayesBuchanan</dc:creator>
      <dc:date>2022-10-12T12:11:45Z</dc:date>
    </item>
  </channel>
</rss>

