<?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 Attribute in popup from another layer in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/attribute-in-popup-from-another-layer/m-p/1568355#M10140</link>
    <description>&lt;P&gt;Hi all, i need show attribute in popup. I have arcade script and that work in map viewer, but in Field Maps not work. Field maps write error with error code 22.&lt;/P&gt;&lt;P&gt;can someone help me?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Here is error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The name of the expression: expr0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression title: taxon_tid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error domain: com.esri.arcgisruntime.ArcGISRuntimeException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error code: 22&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error description: Check getCause() for further error information.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have layer with name "bio body verej" and i need in popup attribute "tid" from layer "nazev taxonu bod".&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var ogc_fid=$feature.ogc_fid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var taxon_fs=FeatureSetByName($map, "Nazev taxonu bod",["ogc_fid","tid"])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var taxon_fs_filter=Filter(taxon_fs, "ogc_fid=@ogc_fid")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var tid_filter=First(taxon_fs_filter)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return tid_filter.tid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="field_maps.jpg" style="width: 450px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121700iFEE49C17365F5EE4/image-size/large?v=v2&amp;amp;px=999" role="button" title="field_maps.jpg" alt="field_maps.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2024 11:13:47 GMT</pubDate>
    <dc:creator>vlakol</dc:creator>
    <dc:date>2024-12-13T11:13:47Z</dc:date>
    <item>
      <title>Attribute in popup from another layer</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/attribute-in-popup-from-another-layer/m-p/1568355#M10140</link>
      <description>&lt;P&gt;Hi all, i need show attribute in popup. I have arcade script and that work in map viewer, but in Field Maps not work. Field maps write error with error code 22.&lt;/P&gt;&lt;P&gt;can someone help me?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Here is error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The name of the expression: expr0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression title: taxon_tid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error domain: com.esri.arcgisruntime.ArcGISRuntimeException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error code: 22&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error description: Check getCause() for further error information.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have layer with name "bio body verej" and i need in popup attribute "tid" from layer "nazev taxonu bod".&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var ogc_fid=$feature.ogc_fid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var taxon_fs=FeatureSetByName($map, "Nazev taxonu bod",["ogc_fid","tid"])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var taxon_fs_filter=Filter(taxon_fs, "ogc_fid=@ogc_fid")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var tid_filter=First(taxon_fs_filter)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return tid_filter.tid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="field_maps.jpg" style="width: 450px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121700iFEE49C17365F5EE4/image-size/large?v=v2&amp;amp;px=999" role="button" title="field_maps.jpg" alt="field_maps.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 11:13:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/attribute-in-popup-from-another-layer/m-p/1568355#M10140</guid>
      <dc:creator>vlakol</dc:creator>
      <dc:date>2024-12-13T11:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute in popup from another layer</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/attribute-in-popup-from-another-layer/m-p/1568671#M10145</link>
      <description>&lt;P&gt;Try replacing the @ with this:&lt;/P&gt;&lt;P&gt;var taxon_fs_filter=Filter(taxon_fs, "ogc_fid=@ogc_fid")&lt;/P&gt;&lt;P&gt;"ogc_fid=@ogc_fid"&lt;/P&gt;&lt;P&gt;To&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var taxon_fs_filter=Filter(taxon_fs, &lt;/SPAN&gt;"ogc_fid=" + ogc_fid)&lt;/P&gt;&lt;P&gt;I'd also recommend:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Check case sensitivity of map layer name or use featuresetbyid&lt;/LI&gt;&lt;LI&gt;Add handling for null values, when a result is not returned&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Use a different variable name for ogc_fid as it's just confusing&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sun, 15 Dec 2024 00:08:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/attribute-in-popup-from-another-layer/m-p/1568671#M10145</guid>
      <dc:creator>ChristopherCounsell</dc:creator>
      <dc:date>2024-12-15T00:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute in popup from another layer</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/attribute-in-popup-from-another-layer/m-p/1568785#M10146</link>
      <description>&lt;P&gt;Super, Thank you very much. Problem was in&amp;nbsp;&lt;SPAN&gt;featuresetbyname. After changing to&amp;nbsp;featuresetbyid, all works.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 09:54:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/attribute-in-popup-from-another-layer/m-p/1568785#M10146</guid>
      <dc:creator>vlakol</dc:creator>
      <dc:date>2024-12-16T09:54:37Z</dc:date>
    </item>
  </channel>
</rss>

