<?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 Passing centroid from a feature in Field Maps to repeat group geopoint in Survey123 (apps) in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/passing-centroid-from-a-feature-in-field-maps-to/m-p/1054460#M34336</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to pass the centroid of a feature from the Field Maps field app to the Survey123 field app through the URL parameters. I have poached the following arcade expressions to find the lat/lon:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lat = (Centroid($feature).Y / originShift) * 180.0;
lat = 180.0 / PI * (2.0 * Atan( Exp(lat * PI / 180.0)) - PI / 2.0);

return lat&lt;/LI-CODE&gt;&lt;LI-CODE lang="java"&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (Centroid($feature).X / originShift) * 180.0

return lon&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then pass that in to my URL parameter as "...&amp;amp;?center={expression/expr0},{expression/expr1}"&lt;/P&gt;&lt;P&gt;When I test these expressions in the arcade dialogue they return the correct coordinates, but the geopoint is still centered on my iPad's location when it opens Survey123. I was wondering if this is because my geopoints are in a repeat group, or if there are some known bugs when the geopoints are in a repeat, like it has to go to the 'name' field in the XLSform or something?&lt;/P&gt;&lt;P&gt;The points are collecting land use information on a single parcel of land so it would be ideal to keep it to one survey submission per parcel. I would like to have each new record start at the centroid, then the user can move it around to collect the specific survey data on the parcel.&amp;nbsp;My geopoint question is set to required, and I built the survey in Connect. Not sure how much info to supply but I'm happy to provide more if necessary!&lt;/P&gt;&lt;P&gt;Unrelated, but I'm also having trouble with the callback function to return to the Field Maps app once I submit the survey. It's written this way at the moment: "...&amp;amp;callback=fieldmaps.arcgis.app://" in the parameters, but to no avail.&lt;/P&gt;&lt;P&gt;Any help is appreciated, thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 04 May 2021 22:30:17 GMT</pubDate>
    <dc:creator>Kiyomi_Holman</dc:creator>
    <dc:date>2021-05-04T22:30:17Z</dc:date>
    <item>
      <title>Passing centroid from a feature in Field Maps to repeat group geopoint in Survey123 (apps)</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/passing-centroid-from-a-feature-in-field-maps-to/m-p/1054460#M34336</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to pass the centroid of a feature from the Field Maps field app to the Survey123 field app through the URL parameters. I have poached the following arcade expressions to find the lat/lon:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lat = (Centroid($feature).Y / originShift) * 180.0;
lat = 180.0 / PI * (2.0 * Atan( Exp(lat * PI / 180.0)) - PI / 2.0);

return lat&lt;/LI-CODE&gt;&lt;LI-CODE lang="java"&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (Centroid($feature).X / originShift) * 180.0

return lon&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then pass that in to my URL parameter as "...&amp;amp;?center={expression/expr0},{expression/expr1}"&lt;/P&gt;&lt;P&gt;When I test these expressions in the arcade dialogue they return the correct coordinates, but the geopoint is still centered on my iPad's location when it opens Survey123. I was wondering if this is because my geopoints are in a repeat group, or if there are some known bugs when the geopoints are in a repeat, like it has to go to the 'name' field in the XLSform or something?&lt;/P&gt;&lt;P&gt;The points are collecting land use information on a single parcel of land so it would be ideal to keep it to one survey submission per parcel. I would like to have each new record start at the centroid, then the user can move it around to collect the specific survey data on the parcel.&amp;nbsp;My geopoint question is set to required, and I built the survey in Connect. Not sure how much info to supply but I'm happy to provide more if necessary!&lt;/P&gt;&lt;P&gt;Unrelated, but I'm also having trouble with the callback function to return to the Field Maps app once I submit the survey. It's written this way at the moment: "...&amp;amp;callback=fieldmaps.arcgis.app://" in the parameters, but to no avail.&lt;/P&gt;&lt;P&gt;Any help is appreciated, thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 22:30:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/passing-centroid-from-a-feature-in-field-maps-to/m-p/1054460#M34336</guid>
      <dc:creator>Kiyomi_Holman</dc:creator>
      <dc:date>2021-05-04T22:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Passing centroid from a feature in Field Maps to repeat group geopoint in Survey123 (apps)</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/passing-centroid-from-a-feature-in-field-maps-to/m-p/1054621#M34353</link>
      <description>&lt;P&gt;With repeats I had better luck passing into a top level placeholder field, then in the repeat inherit that placeholder field.&lt;/P&gt;&lt;P&gt;Hope that does it I do not pass coordinates much.&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 13:52:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/passing-centroid-from-a-feature-in-field-maps-to/m-p/1054621#M34353</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-05-05T13:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Passing centroid from a feature in Field Maps to repeat group geopoint in Survey123 (apps)</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/passing-centroid-from-a-feature-in-field-maps-to/m-p/1054827#M34377</link>
      <description>&lt;P&gt;Thank you for the suggestion! I think I just tried what you described, but let me check:&lt;/P&gt;&lt;P&gt;I created a geopoint outside my repeat to pass the center coordinates to, then set the default of the repeats to this geopoint. Is this what you meant?&lt;/P&gt;&lt;P&gt;I do not want this dummy geopoint to show on my form so I also tried setting the appearance to hidden, and in another attempt I made the type itself hidden instead of geopoint. I then tried to see if it would work with it displayed with normal settings anyway. None of these attempts have successfully passed the coordinates to my geopoint(s). I have also se the default to null as is stated in the documentation, but then that just makes the map go away.&lt;/P&gt;&lt;P&gt;I am able to pass other information like parcel IDs, it's just the coordinates that aren't doing what I want which makes me more suspicious that&amp;nbsp;it has to do with the arcade expression, url parameters, or app settings...or my brain haha&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 18:47:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/passing-centroid-from-a-feature-in-field-maps-to/m-p/1054827#M34377</guid>
      <dc:creator>Kiyomi_Holman</dc:creator>
      <dc:date>2021-05-05T18:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Passing centroid from a feature in Field Maps to repeat group geopoint in Survey123 (apps)</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/passing-centroid-from-a-feature-in-field-maps-to/m-p/1054870#M34381</link>
      <description>&lt;P&gt;You can not pass into a hidden field - I actually had this in my form today.&amp;nbsp; Using the style of hidden I am not sure if that works or not since it is new.&amp;nbsp; Have you tried that?&lt;/P&gt;&lt;P&gt;If you do not care about the main form point at all then you could just pass the coords to a text field then use that in the repeat default/calc.&lt;/P&gt;&lt;P&gt;Worst case wrap a group around the main geopoint and set it to compact (closed) and no one will really see it.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 19:57:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/passing-centroid-from-a-feature-in-field-maps-to/m-p/1054870#M34381</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-05-05T19:57:44Z</dc:date>
    </item>
  </channel>
</rss>

