<?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: Auto populate region based on GPS in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/auto-populate-region-based-on-gps/m-p/1171285#M3293</link>
    <description>&lt;P&gt;When I test this calculated expression, it works correctly. However, when I try using it in the form it doesn't populate the field. Not sure why.&lt;/P&gt;&lt;P&gt;Ideally I need it to be the default value, but still give the user the option to edit it if it is incorrect. It appears that editing the field must be disabled for calculated expressions, so in this instance&amp;nbsp;@Anonymous User&amp;nbsp;perhaps its not viable?&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 20:30:08 GMT</pubDate>
    <dc:creator>OliverIshmael</dc:creator>
    <dc:date>2022-05-05T20:30:08Z</dc:date>
    <item>
      <title>Auto populate region based on GPS</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/auto-populate-region-based-on-gps/m-p/1169683#M3224</link>
      <description>&lt;P&gt;In a form I am developing users currently pick which region of the country they are in and I wonder if this could be pre-populated using the GPS.&lt;/P&gt;&lt;P&gt;The regions are quite large, so the GPS reading wouldn't need to be super accurate (assuming they are not close to a region border) so I am hoping it could be calculated quickly.&lt;/P&gt;&lt;P&gt;Can this be achieved in any way e.g. using calculated expressions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 12:52:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/auto-populate-region-based-on-gps/m-p/1169683#M3224</guid>
      <dc:creator>OliverIshmael</dc:creator>
      <dc:date>2022-05-02T12:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Auto populate region based on GPS</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/auto-populate-region-based-on-gps/m-p/1169797#M3231</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/89669"&gt;@OliverIshmael&lt;/a&gt;&amp;nbsp; Yup, you can do this. Here's an example to get the name of the region the device location is currently in. It returns the first region that is intersected, otherwise it defaults to returning null.&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6305526313112w250h540r150" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6305526313112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6305526313112w250h540r150');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6305526313112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Intersect the current location with the Region layer in the map
var features = Intersects($feature, FeatureSetByName($map, 'Region'))

// If there's at least one intersecting region, 
// return the Name of the first one
if (Count(features) &amp;gt; 0) {
    return First(features)['Name']
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 18:09:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/auto-populate-region-based-on-gps/m-p/1169797#M3231</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-05-02T18:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Auto populate region based on GPS</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/auto-populate-region-based-on-gps/m-p/1171285#M3293</link>
      <description>&lt;P&gt;When I test this calculated expression, it works correctly. However, when I try using it in the form it doesn't populate the field. Not sure why.&lt;/P&gt;&lt;P&gt;Ideally I need it to be the default value, but still give the user the option to edit it if it is incorrect. It appears that editing the field must be disabled for calculated expressions, so in this instance&amp;nbsp;@Anonymous User&amp;nbsp;perhaps its not viable?&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 20:30:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/auto-populate-region-based-on-gps/m-p/1171285#M3293</guid>
      <dc:creator>OliverIshmael</dc:creator>
      <dc:date>2022-05-05T20:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Auto populate region based on GPS</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/auto-populate-region-based-on-gps/m-p/1171350#M3296</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;However, when I try using it in the form it doesn't populate the field&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Are you seeing this in the Field Maps app? If so, iOS or Android?&lt;/P&gt;&lt;P&gt;Calculations only work if the form element is non-editable. We're planning to make the editable property dynamic via Arcade as well. So you can have it calculate in some cases, and not in others.&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 00:34:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/auto-populate-region-based-on-gps/m-p/1171350#M3296</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-05-06T00:34:13Z</dc:date>
    </item>
  </channel>
</rss>

