<?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: calculated expression is working fine while testing but  not populating in fields in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-is-working-fine-while/m-p/1207127#M4398</link>
    <description>&lt;P&gt;You're comparing $feature.RAINFALL to a string value. Is the field really a string field?&lt;/P&gt;&lt;P&gt;Also, you can shorten that script like so:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var mdm1 = [1,1,2,2,3,3,3,5];
var mdm2 = [1,1,1,2,2,2,2,3];
var mdm;
if (DomainName($feature,"Area_Charectristics") == "Open Forest")
{ mdm=mdm1;}
if (DomainName($feature,"Area_Charectristics") == "Open Grassland")
{ mdm=mdm2;}

var index = Number($feature.RAINFALL);
return mdm[index]&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 29 Aug 2022 09:21:05 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-08-29T09:21:05Z</dc:date>
    <item>
      <title>calculated expression is working fine while testing but  not populating in fields</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-is-working-fine-while/m-p/1206596#M4389</link>
      <description>&lt;P&gt;&lt;SPAN&gt;forms for every calculated expression is working fine while testing but not populating in fields&amp;nbsp;&amp;nbsp;while populating&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for more insight This was the script getting&amp;nbsp;result on testing&amp;nbsp;but not on inputting&amp;nbsp;data in form&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var mdm1 = [1,1,2,2,3,3,3,5];&lt;BR /&gt;var mdm2 = [1,1,1,2,2,2,2,3];&lt;BR /&gt;var mdm;&lt;BR /&gt;if (DomainName($feature,"Area_Charectristics") == "Open Forest")&lt;BR /&gt;{ mdm=mdm1;}&lt;BR /&gt;if (DomainName($feature,"Area_Charectristics") == "Open Grassland")&lt;BR /&gt;{ mdm=mdm2;}&lt;BR /&gt;if ($feature.RAINFALL=="0"){&lt;BR /&gt;return mdm[0];&lt;BR /&gt;}&lt;BR /&gt;if ($feature.RAINFALL=="1"){&lt;BR /&gt;return mdm[1];&lt;BR /&gt;}&lt;BR /&gt;if ($feature.RAINFALL=="2"){&lt;BR /&gt;return mdm[2];&lt;BR /&gt;}&lt;BR /&gt;if ($feature.RAINFALL=="3"){&lt;BR /&gt;return mdm[3];&lt;BR /&gt;}&lt;BR /&gt;if ($feature.RAINFALL=="4"){&lt;BR /&gt;return mdm[4];&lt;BR /&gt;}&lt;BR /&gt;if ($feature.RAINFALL=="5"){&lt;BR /&gt;return mdm[5];&lt;BR /&gt;}&lt;BR /&gt;if ($feature.RAINFALL=="6"){&lt;BR /&gt;return mdm[6];&lt;BR /&gt;}&lt;BR /&gt;if ($feature.RAINFALL=="7"){&lt;BR /&gt;return mdm[7];&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 00:59:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-is-working-fine-while/m-p/1206596#M4389</guid>
      <dc:creator>SajoJose</dc:creator>
      <dc:date>2022-08-26T00:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: calculated expression is working fine while testing but  not populating in fields</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-is-working-fine-while/m-p/1207127#M4398</link>
      <description>&lt;P&gt;You're comparing $feature.RAINFALL to a string value. Is the field really a string field?&lt;/P&gt;&lt;P&gt;Also, you can shorten that script like so:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var mdm1 = [1,1,2,2,3,3,3,5];
var mdm2 = [1,1,1,2,2,2,2,3];
var mdm;
if (DomainName($feature,"Area_Charectristics") == "Open Forest")
{ mdm=mdm1;}
if (DomainName($feature,"Area_Charectristics") == "Open Grassland")
{ mdm=mdm2;}

var index = Number($feature.RAINFALL);
return mdm[index]&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 Aug 2022 09:21:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-is-working-fine-while/m-p/1207127#M4398</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-08-29T09:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: calculated expression is working fine while testing but  not populating in fields</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-is-working-fine-while/m-p/1207503#M4404</link>
      <description>&lt;P&gt;Thanks for the response&lt;BR /&gt;$feature.RAILFALL is a code value&lt;/P&gt;&lt;P&gt;This is also returns value while testing but no updating while inputting through forms&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 00:08:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-is-working-fine-while/m-p/1207503#M4404</guid>
      <dc:creator>SajoJose</dc:creator>
      <dc:date>2022-08-30T00:08:15Z</dc:date>
    </item>
  </channel>
</rss>

