<?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 Field Maps and Calculated Expression in field in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573921#M10210</link>
    <description>&lt;P&gt;I have a field called Park Name in my form and the user selects the park from a list of options.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another field called Parent_Asset_ID.&amp;nbsp; The asset ID's have already been assigned and each park has a parent asset id.&amp;nbsp; Instead of the user having to pick this, I would like the field to fill in automatically based on the park name they selected in the previous step.&amp;nbsp; How can I do this?&amp;nbsp; Where would I have to put the list of Parent_Asset_ID's? I did all the parks layer to my field maps and the asset id's are in there.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CJCowardin_0-1736434060496.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123022i4AF5804FFA26571B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CJCowardin_0-1736434060496.png" alt="CJCowardin_0-1736434060496.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2025 14:47:51 GMT</pubDate>
    <dc:creator>CJCowardin</dc:creator>
    <dc:date>2025-01-09T14:47:51Z</dc:date>
    <item>
      <title>Field Maps and Calculated Expression in field</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573921#M10210</link>
      <description>&lt;P&gt;I have a field called Park Name in my form and the user selects the park from a list of options.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another field called Parent_Asset_ID.&amp;nbsp; The asset ID's have already been assigned and each park has a parent asset id.&amp;nbsp; Instead of the user having to pick this, I would like the field to fill in automatically based on the park name they selected in the previous step.&amp;nbsp; How can I do this?&amp;nbsp; Where would I have to put the list of Parent_Asset_ID's? I did all the parks layer to my field maps and the asset id's are in there.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CJCowardin_0-1736434060496.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123022i4AF5804FFA26571B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CJCowardin_0-1736434060496.png" alt="CJCowardin_0-1736434060496.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 14:47:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573921#M10210</guid>
      <dc:creator>CJCowardin</dc:creator>
      <dc:date>2025-01-09T14:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps and Calculated Expression in field</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573930#M10211</link>
      <description>&lt;P&gt;If there's no relationship class or anything like that to rely on, you could use a Calculated Expression on the Parent_Asset_ID field. Here's an example where I would use the value from a tree species field to populate a "general tree category" field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if($feature.species=='Bur Oak (Quercus macrocarpa)'){ return 'Oak' }
else if ($feature.species=='Ginko (Ginko biloba)'){ return 'Ginko' }
else if ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you just match up the appropriate asset id. Possibly a bit ham-handed, but it all depends on your setup. If the user isn't creating a feature, then you can't do an intersect, and if there's no relationship class, you can't call it out that way.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 15:03:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573930#M10211</guid>
      <dc:creator>ZachBodenner</dc:creator>
      <dc:date>2025-01-09T15:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps and Calculated Expression in field</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573939#M10212</link>
      <description>&lt;P&gt;Thank you. I appreciate the feedback. May be time consuming with 200 parks but if it's the only way.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 15:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573939#M10212</guid>
      <dc:creator>CJCowardin</dc:creator>
      <dc:date>2025-01-09T15:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps and Calculated Expression in field</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573950#M10214</link>
      <description>&lt;P&gt;A slightly quicker option might be the Decode function in Arcade. That one works by just using matched pairs. As an example:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var p = $feature.ParkName
var assetID = Decode(p,'Park Name 1','Asset ID 1','Park Name 2','Asset ID 2', etc,'Default Value')&lt;/LI-CODE&gt;&lt;P&gt;It's a faster type anyway, does the same thing as the multiple If-else lines.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 15:39:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573950#M10214</guid>
      <dc:creator>ZachBodenner</dc:creator>
      <dc:date>2025-01-09T15:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps and Calculated Expression in field</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573951#M10215</link>
      <description>&lt;P&gt;Might be best to create a Dictionary to store the Keys and Values, then expression using if else with HasKey() or DefaultValue()&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 15:41:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573951#M10215</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2025-01-09T15:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps and Calculated Expression in field</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573972#M10216</link>
      <description>&lt;P&gt;Suggest you read this &lt;A href="https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-for-arcgis-field-maps/" target="_self"&gt;blog&lt;/A&gt;, then follow the links to examples, you put the calculate expressions into the layers form.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 16:20:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1573972#M10216</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2025-01-09T16:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps and Calculated Expression in field</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1574149#M10218</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/436621"&gt;@CJCowardin&lt;/a&gt;&amp;nbsp;Does the park ID need to be filled out when the data is being collected in the field? If not, you can do some post-processing on your data and add those park IDs to the data back in the office. You can either do it manually with a field calculation or set up a python script.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 20:25:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1574149#M10218</guid>
      <dc:creator>KerriRasmussen</dc:creator>
      <dc:date>2025-01-09T20:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps and Calculated Expression in field</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1582190#M10364</link>
      <description>&lt;P&gt;I think I can use this example in my field maps app but just need help changing the information to fit what I have. If someone could help, that would be much appreciated.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Create a feature set using the 'Regions' layer in the map&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;regions&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;featuresetByName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$map&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Regions'&lt;/SPAN&gt;&lt;SPAN&gt;, [&lt;/SPAN&gt;&lt;SPAN&gt;'name'&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Intersect the current location with the regions and &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// get the first region&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;region&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;First&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Intersects&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;regions&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// If the current location does intersect a feature, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// return the name of the region. Otherwise, return null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (!&lt;/SPAN&gt;&lt;SPAN&gt;IsEmpty&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;region&lt;/SPAN&gt;&lt;SPAN&gt;)) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;region&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;'name'&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The feature class in my map where the info would come from is County_Parks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The field with the information is Asset_ID&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Feb 2025 13:06:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-and-calculated-expression-in-field/m-p/1582190#M10364</guid>
      <dc:creator>CJCowardin</dc:creator>
      <dc:date>2025-02-05T13:06:24Z</dc:date>
    </item>
  </channel>
</rss>

