<?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: Create dynamic map pop-up with only answered fields from Survey123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1666717#M64790</link>
    <description>&lt;P&gt;You can add an Arcade Element to your popup with this code. It loops through each field in the feature and returns only the fields that contain a value. This also includes a variable (exceptedFields) that contains fields you don't want to show in the field list. Note that those field names are case sensitive.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Expects($feature, "*");

var fields = Schema($feature).fields;

var attributes = {};
var fieldInfos = [];
var exceptedFields = ["OBJECTID", "GlobalID"]; //case sensitive!
for (var f of fields) {
  if (!Includes(exceptedFields, f.name)) {
    if (Trim($feature[f.name]) != "") {
      attributes[f.alias] = $feature[f.name];
      Push(fieldInfos, { fieldName: f.alias });
    }
  }
}

return { type: "fields", fieldInfos: fieldInfos, attributes: attributes };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Nov 2025 14:53:20 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2025-11-18T14:53:20Z</dc:date>
    <item>
      <title>Create dynamic map pop-up with only answered fields from Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1666583#M64788</link>
      <description>&lt;P&gt;I have a survey I created using Survey123 that has over 100 individual questions.&amp;nbsp; In the survey, most of the questions are folded into others such that filling out the survey only results in filling out at most 20 of the 100 plus fields.&amp;nbsp; This makes the pop-up for each survey submission on the web map super long and tedious.&lt;/P&gt;&lt;P&gt;Ideally, I would like to create some type of dynamic Arcade code (or any other workaround) that removes fields from the pop-up that were unanswered (have NULL values).&amp;nbsp; Because I have so many fields, it would be extremely tedious to write if statements for each field.&amp;nbsp; Are there any developments in the works or known solutions that would allow for removal of all unanswered fields (questions) from the pop-up to reduce its length?&amp;nbsp; The idea is I want all answered fields to be visible in the pop-up but nothing else.&amp;nbsp; Thank you for any advice or insight and your time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 02:57:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1666583#M64788</guid>
      <dc:creator>EricDilley</dc:creator>
      <dc:date>2025-11-18T02:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic map pop-up with only answered fields from Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1666703#M64789</link>
      <description>&lt;P&gt;Check out this knowledge article&amp;nbsp;&lt;A href="https://support.esri.com/en-us/knowledge-base/how-to-replace-or-omit-empty-attribute-fields-from-disp-000026998" target="_blank"&gt;How To: Replace or Omit Empty Attribute Fields from Displaying in Pop-Ups Using a Custom A&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Or&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;has a solution here:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/don-t-show-null-values-in-popup/td-p/1359679" target="_blank"&gt;don't show null values in popup - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 14:08:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1666703#M64789</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2025-11-18T14:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic map pop-up with only answered fields from Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1666717#M64790</link>
      <description>&lt;P&gt;You can add an Arcade Element to your popup with this code. It loops through each field in the feature and returns only the fields that contain a value. This also includes a variable (exceptedFields) that contains fields you don't want to show in the field list. Note that those field names are case sensitive.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Expects($feature, "*");

var fields = Schema($feature).fields;

var attributes = {};
var fieldInfos = [];
var exceptedFields = ["OBJECTID", "GlobalID"]; //case sensitive!
for (var f of fields) {
  if (!Includes(exceptedFields, f.name)) {
    if (Trim($feature[f.name]) != "") {
      attributes[f.alias] = $feature[f.name];
      Push(fieldInfos, { fieldName: f.alias });
    }
  }
}

return { type: "fields", fieldInfos: fieldInfos, attributes: attributes };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 14:53:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1666717#M64790</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-11-18T14:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic map pop-up with only answered fields from Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1666794#M64798</link>
      <description>&lt;P&gt;Thank you KenBuja!&amp;nbsp; This worked perfectly just as I wanted!&amp;nbsp; Just one thing to note for anyone who comes upon this thread, you add this to the pop-up by clicking on "Add content" and then selecting an "Arcade".&amp;nbsp; You then copy the above code into the Arcade expression window and then you are good to go!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 18:06:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1666794#M64798</guid>
      <dc:creator>EricDilley</dc:creator>
      <dc:date>2025-11-18T18:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic map pop-up with only answered fields from Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1716800#M66688</link>
      <description>&lt;P&gt;This rocks; thanks to the both of you!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2026 15:58:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/create-dynamic-map-pop-up-with-only-answered/m-p/1716800#M66688</guid>
      <dc:creator>CapeCodCommission</dc:creator>
      <dc:date>2026-07-27T15:58:19Z</dc:date>
    </item>
  </channel>
</rss>

