<?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: Populate field based on values in other fields collected in Field Maps in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1251215#M5210</link>
    <description>&lt;P class=""&gt;Hi Courtney,&lt;/P&gt;&lt;P class=""&gt;This is possible and there are a few ways to achieve it. I’ll give you my favorite as I think it’s the cleanest to read (personal preference).&lt;/P&gt;&lt;P class=""&gt;When($feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Very Low", "Unlikely",&lt;/P&gt;&lt;P class=""&gt;$feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Low", "Somwhat likely",&lt;/P&gt;&lt;P class=""&gt;$feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Medium", "Likely", &lt;I&gt;&lt;STRONG&gt;add in the rest of your statements following the same format&lt;/STRONG&gt;,&lt;/I&gt;&lt;/P&gt;&lt;P class=""&gt;“&lt;EM&gt;&lt;STRONG&gt;you need to add a default value&lt;/STRONG&gt;&lt;/EM&gt;”)&lt;/P&gt;&lt;P class=""&gt;The format of the When function is When(expression1, result1, expression2, result2, defaultValue)&lt;/P&gt;&lt;P class=""&gt;Other options include using the IIF function or an If statement.&lt;/P&gt;&lt;P class=""&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2023 12:20:41 GMT</pubDate>
    <dc:creator>SarahSaint-Ruth</dc:creator>
    <dc:date>2023-01-25T12:20:41Z</dc:date>
    <item>
      <title>Populate field based on values in other fields collected in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1251086#M5205</link>
      <description>&lt;P&gt;I have a tree dataset that is shared as a service, added to a Map on AGOL with a related table and edited in field maps with some inspection fields:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;LikelihoodOfFailure&lt;/LI&gt;&lt;LI&gt;LikelihoodOfImpactTarget&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I have a third field called &lt;STRONG&gt;LikelihoodRating&lt;/STRONG&gt; that I want to be populated based on the input values of&amp;nbsp;LikelihoodOfFailure and&amp;nbsp;LikelihoodOfImpactTarget on the fly.&lt;/P&gt;&lt;P&gt;So far I have found examples where this can be populated using a calculator with Arcade but I an really hoping this can be done automatically as the field user enters the values in field maps.&lt;/P&gt;&lt;P&gt;The logic I think I am looking for is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if ($feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Very Low" {return "Unlikely"}
if ($feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Low" {return "Somwhat likely"}
if ($feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Medium" {return "Likely"}
if ($feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "High" {return "Very likely"}

if ($feature.LikelihoodOfFailure == "Probable" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Very Low" {return "Unlikely"}
if ($feature.LikelihoodOfFailure == "Probable" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Low" {return "Unlikely"}
if ($feature.LikelihoodOfFailure == "Probable" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Medium" {return "Somewhat likely"}
if ($feature.LikelihoodOfFailure == "Probable" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "High" {return "Likely"}

if ($feature.LikelihoodOfFailure == "Possible" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Very Low" {return "Unlikely"}
if ($feature.LikelihoodOfFailure == "Possible" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Low" {return "Unlikely"}
if ($feature.LikelihoodOfFailure == "Possible" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Medium" {return "Unlikely"}
if ($feature.LikelihoodOfFailure == "Possible" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "High" {return "Somewhat likely"}

if ($feature.LikelihoodOfFailure == "Improbable" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Very Low" {return "Unlikely"}
if ($feature.LikelihoodOfFailure == "Improbable" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Low" {return "Unlikely"}
if ($feature.LikelihoodOfFailure == "Improbable" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Medium" {return "Unlikely"}
if ($feature.LikelihoodOfFailure == "Improbable" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "High" {return "Unlikely"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i'm not convinced this is possible.&amp;nbsp; Or will this all need to be done manually post capture?&lt;/P&gt;&lt;P&gt;Can a field be populated at the database level based on fields captured in Field Maps?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 00:06:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1251086#M5205</guid>
      <dc:creator>CourtneyWatson</dc:creator>
      <dc:date>2023-01-25T00:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Populate field based on values in other fields collected in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1251215#M5210</link>
      <description>&lt;P class=""&gt;Hi Courtney,&lt;/P&gt;&lt;P class=""&gt;This is possible and there are a few ways to achieve it. I’ll give you my favorite as I think it’s the cleanest to read (personal preference).&lt;/P&gt;&lt;P class=""&gt;When($feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Very Low", "Unlikely",&lt;/P&gt;&lt;P class=""&gt;$feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Low", "Somwhat likely",&lt;/P&gt;&lt;P class=""&gt;$feature.LikelihoodOfFailure == "Imminent" &amp;amp;&amp;amp; $feature.LikelihoodOfImpactTarget == "Medium", "Likely", &lt;I&gt;&lt;STRONG&gt;add in the rest of your statements following the same format&lt;/STRONG&gt;,&lt;/I&gt;&lt;/P&gt;&lt;P class=""&gt;“&lt;EM&gt;&lt;STRONG&gt;you need to add a default value&lt;/STRONG&gt;&lt;/EM&gt;”)&lt;/P&gt;&lt;P class=""&gt;The format of the When function is When(expression1, result1, expression2, result2, defaultValue)&lt;/P&gt;&lt;P class=""&gt;Other options include using the IIF function or an If statement.&lt;/P&gt;&lt;P class=""&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 12:20:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1251215#M5210</guid>
      <dc:creator>SarahSaint-Ruth</dc:creator>
      <dc:date>2023-01-25T12:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Populate field based on values in other fields collected in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1252224#M5231</link>
      <description>&lt;P&gt;Thank you Sarah, when statement sounds good but I cannot use default values.&amp;nbsp; Where exactly do I put it though so the field auto populates?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 02:35:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1252224#M5231</guid>
      <dc:creator>CourtneyWatson</dc:creator>
      <dc:date>2023-01-27T02:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Populate field based on values in other fields collected in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1252345#M5235</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Where to add this in Field Maps&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You will need to configure this in Field Maps Designer (Field Maps web application) or in the Map Viewer. You can add expressions as part of configuring the form. &lt;A href="https://doc.arcgis.com/en/field-maps/android/help/configure-the-form.htm" target="_blank" rel="noopener"&gt;Here is the doc&lt;/A&gt; on how to configure the Form in Field Maps.&amp;nbsp; This is the specific part of the documentation that discusses &lt;A href="https://doc.arcgis.com/en/field-maps/android/help/configure-the-form.htm#ESRI_SECTION1_ECDC6C18501D440AAED727A0FDBCEFDF" target="_blank" rel="noopener"&gt;adding Arcade&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Default Values&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You just need to add a default value to the end of the expression as that's what is required for the When function. If its a string field you're populating you can use "Undefined". It will only appear as undefined if the conditions you have set in the When() expression are not met.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 14:37:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1252345#M5235</guid>
      <dc:creator>SarahSaint-Ruth</dc:creator>
      <dc:date>2023-01-27T14:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Populate field based on values in other fields collected in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1252724#M5241</link>
      <description>&lt;P&gt;Thanks for your help Sarah.&amp;nbsp; When I open Map Viewer Beta or Classic I have no option to configure the form.&lt;/P&gt;&lt;P&gt;In the Form Builder in the Field Maps app there is also no option to add an expression other than for conditional visibility. Dang.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 21:15:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1252724#M5241</guid>
      <dc:creator>CourtneyWatson</dc:creator>
      <dc:date>2023-01-29T21:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Populate field based on values in other fields collected in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1252929#M5242</link>
      <description>&lt;P&gt;Hey Courtney is this a hosted feature service and are you using ArcGIS Online?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 15:58:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1252929#M5242</guid>
      <dc:creator>SarahSaint-Ruth</dc:creator>
      <dc:date>2023-01-30T15:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Populate field based on values in other fields collected in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1253648#M5257</link>
      <description>&lt;P&gt;It's a shared feature service and i'm using Enterprise 10.9.&amp;nbsp; That is probably the issue as I need to be on 11.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 03:30:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/populate-field-based-on-values-in-other-fields/m-p/1253648#M5257</guid>
      <dc:creator>CourtneyWatson</dc:creator>
      <dc:date>2023-02-01T03:30:00Z</dc:date>
    </item>
  </channel>
</rss>

