<?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 is it possible to get a value from a table based on an entered value in the SAME form? in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-get-a-value-from-a-table-based/m-p/1312604#M6630</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a Field Maps form and have 2 fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Field 1: Tree Species Code (SPECIESCOD)&lt;/P&gt;&lt;P&gt;Field 2: Botanical Name (BOTANICAL)&lt;/P&gt;&lt;P&gt;in a same form, after the user enter Field 1 (Species Code), can Field 2 (Botanical name) auto-populate based on a table in the same webmap?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="214"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="94"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;SPC_CODE&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="120"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;BOTANICAL&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABBR&lt;/TD&gt;&lt;TD width="120"&gt;Abies bracteata&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABCI&lt;/TD&gt;&lt;TD width="120"&gt;Abies cilicica&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABCO&lt;/TD&gt;&lt;TD width="120"&gt;Abies concolor&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABGR&lt;/TD&gt;&lt;TD width="120"&gt;Abies grandis&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABPI&lt;/TD&gt;&lt;TD width="120"&gt;Abies pinsapo&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Field 1: user enter ABBR&lt;/P&gt;&lt;P&gt;Field 2: will go to the table and look up ABBR , then the form will auto-populate "Abies bracteata"&lt;/P&gt;&lt;P&gt;(the table is a standalone table in the web map, and it's not join or relate w/ the layer with the form in Field Maps. I saw many sample with using relate table in arcade, how about a standalone table, is it possible? any tips or sample on setting it up in Arcade?&lt;/P&gt;&lt;P&gt;i have this in Arcade, but it gave me an error:&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var SpeciesCode = $feature.SPECIESCOD&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var table = FeatureSetByName($map, "TI2_DEV - SP_CODE_LOOKUP")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var botanicalName&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var filteredTable = Filter(table, "SPECIESCOD = @SPC_CODE")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var result = First(filteredTable)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;if (result) {&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp; botanicalName = result.BOTANICAL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#FF00FF"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;return botanicalName&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;thanks so much!!&lt;/P&gt;&lt;P&gt;W&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 16:13:20 GMT</pubDate>
    <dc:creator>WilsonLee</dc:creator>
    <dc:date>2023-07-27T16:13:20Z</dc:date>
    <item>
      <title>is it possible to get a value from a table based on an entered value in the SAME form?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-get-a-value-from-a-table-based/m-p/1312604#M6630</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a Field Maps form and have 2 fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Field 1: Tree Species Code (SPECIESCOD)&lt;/P&gt;&lt;P&gt;Field 2: Botanical Name (BOTANICAL)&lt;/P&gt;&lt;P&gt;in a same form, after the user enter Field 1 (Species Code), can Field 2 (Botanical name) auto-populate based on a table in the same webmap?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="214"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="94"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;SPC_CODE&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="120"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;BOTANICAL&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABBR&lt;/TD&gt;&lt;TD width="120"&gt;Abies bracteata&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABCI&lt;/TD&gt;&lt;TD width="120"&gt;Abies cilicica&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABCO&lt;/TD&gt;&lt;TD width="120"&gt;Abies concolor&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABGR&lt;/TD&gt;&lt;TD width="120"&gt;Abies grandis&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="94"&gt;ABPI&lt;/TD&gt;&lt;TD width="120"&gt;Abies pinsapo&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Field 1: user enter ABBR&lt;/P&gt;&lt;P&gt;Field 2: will go to the table and look up ABBR , then the form will auto-populate "Abies bracteata"&lt;/P&gt;&lt;P&gt;(the table is a standalone table in the web map, and it's not join or relate w/ the layer with the form in Field Maps. I saw many sample with using relate table in arcade, how about a standalone table, is it possible? any tips or sample on setting it up in Arcade?&lt;/P&gt;&lt;P&gt;i have this in Arcade, but it gave me an error:&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var SpeciesCode = $feature.SPECIESCOD&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var table = FeatureSetByName($map, "TI2_DEV - SP_CODE_LOOKUP")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var botanicalName&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var filteredTable = Filter(table, "SPECIESCOD = @SPC_CODE")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;var result = First(filteredTable)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;if (result) {&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp; botanicalName = result.BOTANICAL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#FF00FF"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;return botanicalName&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;thanks so much!!&lt;/P&gt;&lt;P&gt;W&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 16:13:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-get-a-value-from-a-table-based/m-p/1312604#M6630</guid>
      <dc:creator>WilsonLee</dc:creator>
      <dc:date>2023-07-27T16:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to get a value from a table based on an entered value in the SAME form?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-get-a-value-from-a-table-based/m-p/1312868#M6634</link>
      <description>&lt;P&gt;This seems to be working.&amp;nbsp; Stand alone table, but, added to the map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var SpeciesCode = $feature.Species
var table = FeatureSetByName($map, "TreeTable",['SPC_CODE', 'BOTANICAL'])
var filteredTable = Filter(table, "SPC_CODE = @SpeciesCode")
var result = First(filteredTable)
if(!IsEmpty(result)){
  return result.BOTANICAL
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May have to adjust the field names.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 22:30:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-get-a-value-from-a-table-based/m-p/1312868#M6634</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-07-27T22:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to get a value from a table based on an entered value in the SAME form?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-get-a-value-from-a-table-based/m-p/1312880#M6635</link>
      <description>&lt;P&gt;it works!!!&amp;nbsp; thanks a lot!!!!!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 22:46:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-get-a-value-from-a-table-based/m-p/1312880#M6635</guid>
      <dc:creator>WilsonLee</dc:creator>
      <dc:date>2023-07-27T22:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to get a value from a table based on an entered value in the SAME form?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-get-a-value-from-a-table-based/m-p/1334164#M7126</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am new to Arcade/Field Maps but I am trying to do something similar except with Field 1 named "Common_Name" and Field 2 named "Botanical_Name". The table is uploaded to the same map. The table is titled "TreeNamesTable", common names are stored in the "nCommon" column while the botanical names are stored in the "nBotanical" column. I copied the solution provided above, changing the field names as appropriate, yet I am getting the following error, "&lt;SPAN&gt;Test execution error: Execution error - Invalid parameter. Verify test data." Can either one of you assist me? I have attached the code below. Thank you in advance&amp;nbsp;for your assistance.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 15:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-get-a-value-from-a-table-based/m-p/1334164#M7126</guid>
      <dc:creator>JPWillson</dc:creator>
      <dc:date>2023-10-02T15:27:23Z</dc:date>
    </item>
  </channel>
</rss>

