<?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: Field Maps Filter fonction not working using an intersect value in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-filter-fonction-not-working-using-an/m-p/1688086#M12392</link>
    <description>&lt;P&gt;Hi KenBuja!&lt;/P&gt;&lt;P&gt;no_projet it's a text field. id it's a numeric integer one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try it asap!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!!&lt;/P&gt;</description>
    <pubDate>Tue, 03 Mar 2026 18:05:20 GMT</pubDate>
    <dc:creator>CristianGraf</dc:creator>
    <dc:date>2026-03-03T18:05:20Z</dc:date>
    <item>
      <title>Field Maps Filter fonction not working using an intersect value</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-filter-fonction-not-working-using-an/m-p/1687734#M12374</link>
      <description>&lt;P&gt;Hi Community!&lt;/P&gt;&lt;P&gt;I'm working on a project where half of the data it's intersected from a existing polygon (AKA Project Polygon). This polygon has the base data: project name, number, user, dates... So for any new data created on that specific polygon it will be transfered do the new collected ones.&lt;/P&gt;&lt;P&gt;This is very usefull for us, it's help us maintain a standard flow and it's helps to avoid any misspelling once on the field.&lt;/P&gt;&lt;P&gt;One of our goal it's to create a unique id filtered on the project number. So for any type of data, we will need a unique ID from 1 to X.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's our code... and it's not returnig what we are specting. As we are intersecting the project number (no_proj) from another layer maybe the issue it's there and the filter it's not doing what it should.&lt;/P&gt;&lt;P&gt;Any guess or another wya to do it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;numberlist&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;"2-Station d'inventaire"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Return total list&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;function&lt;/SPAN&gt; &lt;SPAN&gt;RecupererNoProjet&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;np_1&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;EntreesDansProjet&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Filter&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;numberlist&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"no_proj = '"&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;np_1&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;"'"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;max_feature&lt;/SPAN&gt;&lt;SPAN&gt; = &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&lt;SPAN&gt;"id_table"&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;"id_table"&lt;/SPAN&gt;&lt;SPAN&gt;])==&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt; ){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;np_1&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;//Get project number&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;np_1&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;"no_proj"&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//Get total project number&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;num_proj&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;RecupererNoProjet&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;np_1&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;num_proj&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//Return existing velue lor different to 0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;"id_table"&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you!!!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Mar 2026 17:33:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-filter-fonction-not-working-using-an/m-p/1687734#M12374</guid>
      <dc:creator>CristianGraf</dc:creator>
      <dc:date>2026-03-02T17:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps Filter fonction not working using an intersect value</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-filter-fonction-not-working-using-an/m-p/1687990#M12387</link>
      <description>&lt;P&gt;Use the Console function to test whether you're getting back any results from the Filter function. Also, is the field "no_proj" a string field or numeric field? You can use variable substitution in the Filter function to avoid the quote problem&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function RecupererNoProjet(np_1) {
  var EntreesDansProjet = Filter(numberlist, "no_proj = &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/170876"&gt;@NP&lt;/a&gt;_1");
  Console(Count(EntreesDansProjet));
  var max_feature = First(OrderBy(EntreesDansProjet, "id_table DESC"));
  if (max_feature.id_table != null) {
    return max_feature.id_table;
  }
  return 0;
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 03 Mar 2026 14:05:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-filter-fonction-not-working-using-an/m-p/1687990#M12387</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2026-03-03T14:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps Filter fonction not working using an intersect value</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-filter-fonction-not-working-using-an/m-p/1688086#M12392</link>
      <description>&lt;P&gt;Hi KenBuja!&lt;/P&gt;&lt;P&gt;no_projet it's a text field. id it's a numeric integer one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try it asap!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 18:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-filter-fonction-not-working-using-an/m-p/1688086#M12392</guid>
      <dc:creator>CristianGraf</dc:creator>
      <dc:date>2026-03-03T18:05:20Z</dc:date>
    </item>
  </channel>
</rss>

