<?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: Exclude empty field from pop-up with custom order using arcade expression in Field Maps in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1680812#M12232</link>
    <description>&lt;P&gt;Thank you for your response! I am still new to using Arcade Expressions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I first tried the expression the pop up window populates with data. After saving and clicking off the current point to a different point on the same layer all the pop ups are blank. The only way I can get the expression to display anything in the popup window now is to have a field list as well as the arcade expression which is now displaying the block of fields from the arcade expression and the field list in a separate block below. If I remove the field list it returns a blank popup window. I think I am doing something wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas? When I tried looking for solutions to this blank popup issue it looks like I need to use the Expect function but not sure how I would go about that.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jan 2026 17:05:56 GMT</pubDate>
    <dc:creator>range97</dc:creator>
    <dc:date>2026-01-29T17:05:56Z</dc:date>
    <item>
      <title>Exclude empty field from pop-up with custom order using arcade expression in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1680668#M12230</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have fields in my forms that are not relevant/used during every form submission. I would like to exclude empty fields from the popups and always exclude data not relevant to viewer such as&amp;nbsp;&lt;SPAN&gt;OBJECTID&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;EditDate&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Creator&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;GlobalID&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;CreationDate&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Editor etc.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I found an expression from another community post and input the fields I wanted excluded:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;attributes&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Dictionary&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;"attributes"&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;fieldInfos&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;attributeValues&lt;/SPAN&gt;&lt;SPAN&gt; = {};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;excludeFields&lt;/SPAN&gt;&lt;SPAN&gt; = [&lt;/SPAN&gt;&lt;SPAN&gt;"OBJECTID"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"EditDate"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Creator"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;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&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;attributes&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;attributeValues&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This had the intended effect of hiding irrelevant and empty fields.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I need to also control the order in which the returned visible fields are displayed. This expression is currently returning the fields in alphabetical order. I need to have the same three fields displayed at the top of the pop up in the following order for every submission: HMA, Observation Date and Time, and Type. I do not care about the order of the other 5-8 fields that would be displayed. Ideally I would like to order the popup in the same display order of the collector forms.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am not sure how to proceed. I have tried several alternatives and I am not getting the result I intend.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Jan 2026 06:07:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1680668#M12230</guid>
      <dc:creator>range97</dc:creator>
      <dc:date>2026-01-29T06:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude empty field from pop-up with custom order using arcade expression in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1680740#M12231</link>
      <description>&lt;P&gt;To maintain the order of the fields, you have to get the schema of the feature. Try this code, which returns the field alias and domain name (if the field has a domain)&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var fields = Schema($feature).fields;

var fieldInfos = [];
var attributes = {};

var excludeFields = [
  "OBJECTID",
  "EditDate",
  "Creator",
  "GlobalID",
  "CreationDate",
  "Editor"
];

for (var field of fields) {
  var key = field.alias;
  var value = DomainName($feature, field.name);
  if (!IsEmpty(value) &amp;amp;&amp;amp; value != "" &amp;amp;&amp;amp; IndexOf(excludeFields, key) == -1) {
    Push(fieldInfos, { fieldName: key });
    attributes[key] = value;
  }
}
return { type: "fields", fieldInfos: fieldInfos, attributes: attributes };&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 29 Jan 2026 14:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1680740#M12231</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2026-01-29T14:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude empty field from pop-up with custom order using arcade expression in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1680812#M12232</link>
      <description>&lt;P&gt;Thank you for your response! I am still new to using Arcade Expressions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I first tried the expression the pop up window populates with data. After saving and clicking off the current point to a different point on the same layer all the pop ups are blank. The only way I can get the expression to display anything in the popup window now is to have a field list as well as the arcade expression which is now displaying the block of fields from the arcade expression and the field list in a separate block below. If I remove the field list it returns a blank popup window. I think I am doing something wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas? When I tried looking for solutions to this blank popup issue it looks like I need to use the Expect function but not sure how I would go about that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2026 17:05:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1680812#M12232</guid>
      <dc:creator>range97</dc:creator>
      <dc:date>2026-01-29T17:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude empty field from pop-up with custom order using arcade expression in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1680913#M12238</link>
      <description>&lt;P&gt;Thanks for pointing that out. I did leave off the Expects function at the top of the code. All you need to do is add this as the first line&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Expects($feature, "*");&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 29 Jan 2026 19:43:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1680913#M12238</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2026-01-29T19:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude empty field from pop-up with custom order using arcade expression in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1681021#M12239</link>
      <description>&lt;P&gt;Thank you so much for the help! Now it is behaving exactly as I had hoped. I don't think I would have thought to add it to the first line. I had tried it at the end of the string. You have been such a great help, I greatly appreciation for your generosity. Hopefully this also aids someone else.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 04:48:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/exclude-empty-field-from-pop-up-with-custom-order/m-p/1681021#M12239</guid>
      <dc:creator>range97</dc:creator>
      <dc:date>2026-01-30T04:48:12Z</dc:date>
    </item>
  </channel>
</rss>

