<?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: Returning Field Aliases for Specified Fields Using Arcade in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1610584#M64586</link>
    <description>&lt;P&gt;Annd now it stopped working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Apr 2025 20:01:01 GMT</pubDate>
    <dc:creator>JenniferBorlick</dc:creator>
    <dc:date>2025-04-30T20:01:01Z</dc:date>
    <item>
      <title>Returning Field Aliases for Specified Fields Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1185989#M46618</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use Arcade to return the field aliases of fields that have a value of "1" in the data. I have a table of fish species and I would like to return the field alias in the popup anytime there is a value of "1" found in the species record (image of table below). I currently have an Arcade expression that returns all of the field aliases if a "1" is found in the data, but I would like to specify the fields to return.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expression I have so far that returns all:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;var features = FeatureSetByName($map, 'Ocean Prime Fishing Grounds', ['*'], false);&lt;BR /&gt;var aDict = Schema(features);&lt;BR /&gt;var aArray = aDict["fields"];&lt;BR /&gt;var output;&lt;BR /&gt;for (var i in $feature){&lt;BR /&gt;if ($feature[i] == 1) {&lt;BR /&gt;for(var j in aArray) {&lt;BR /&gt;var dict = aArray[j];&lt;BR /&gt;if (dict['name'] == i){&lt;BR /&gt;output += dict['alias'] + TextFormatting.NewLine;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;return output;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here are the specific fields I would like to return:&amp;nbsp;&lt;/P&gt;&lt;P&gt;'SUMMFLOUND', 'SEABASSTAU', 'CODPOLLOCK', 'BLUEFISH', 'WEAKFISH', 'STRIPEDBAS', 'TUNA', 'SHARKS', 'BILLFISH', 'BONITOALBA', 'SCUP', 'RED_HAKE', 'LOBSTER'&lt;/P&gt;&lt;P&gt;Example of the data table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaveK_0-1656076826394.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/44301iA0E738E5483C2F45/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DaveK_0-1656076826394.png" alt="DaveK_0-1656076826394.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The data I'm using is shared publicly -&amp;nbsp;&lt;A href="https://njdep.maps.arcgis.com/home/item.html?id=df7de8c132a749d680ae415b30322fc8" target="_blank"&gt;https://njdep.maps.arcgis.com/home/item.html?id=df7de8c132a749d680ae415b30322fc8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 13:22:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1185989#M46618</guid>
      <dc:creator>DaveK</dc:creator>
      <dc:date>2022-06-24T13:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Field Aliases for Specified Fields Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1186002#M46619</link>
      <description>&lt;P&gt;You can specify the fields returned for the Schema array using&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fields = ['SUMMFLOUND', 'SEABASSTAU', 'CODPOLLOCK', 'BLUEFISH', 'WEAKFISH', 'STRIPEDBAS', 'TUNA', 'SHARKS', 'BILLFISH', 'BONITOALBA', 'SCUP', 'RED_HAKE', 'LOBSTER'];
var features = FeatureSetByName($map, 'Ocean Prime Fishing Grounds', fields, false);&lt;/LI-CODE&gt;&lt;P&gt;Now this will also include the OBJECTID field, so you can test for that when looping through them&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (dict['name'] == i &amp;amp;&amp;amp; dict['name'] != 'OBJECTID'){&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 13:52:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1186002#M46619</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-06-24T13:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Field Aliases for Specified Fields Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1186009#M46621</link>
      <description>&lt;P&gt;And with some more testing, a shorter way of doing this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fields = ['SUMMFLOUND', 'SEABASSTAU', 'CODPOLLOCK', 'BLUEFISH', 'WEAKFISH', 'STRIPEDBAS', 'TUNA', 'SHARKS', 'BILLFISH', 'BONITOALBA', 'SCUP', 'RED_HAKE', 'LOBSTER'];
var features = FeatureSetByName($map, 'Ocean Prime Fishing Grounds', fields, false);
var aDict = Schema(features);
var aArray = aDict['fields'];
var output;
for (var j in aArray) {
    //console(aArray[j]['name'] + ' ' + $feature[aArray[j]['name']])
    if ($feature[aArray[j]['name']] == 1 &amp;amp;&amp;amp; aArray[j]['name'] != 'OBJECTID') {
        output += aArray[j]['alias'] + TextFormatting.NewLine;
    }
}
return output;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 14:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1186009#M46621</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-06-24T14:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Field Aliases for Specified Fields Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1608198#M64497</link>
      <description>&lt;P&gt;THANK YOU! I tried a couple different solutions for my map and they didn't work. They would show up when I ran them in the configuration dialog, but not in the actual pop-up. I tried both the Arcade expression and the Attribute expressions. I finally tried this one and got it to work as an attribute expression.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JenniferBorlick_0-1745342523822.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130756i9ABC48821306F6BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JenniferBorlick_0-1745342523822.png" alt="JenniferBorlick_0-1745342523822.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 17:22:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1608198#M64497</guid>
      <dc:creator>JenniferBorlick</dc:creator>
      <dc:date>2025-04-22T17:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Field Aliases for Specified Fields Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1610584#M64586</link>
      <description>&lt;P&gt;Annd now it stopped working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 20:01:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/returning-field-aliases-for-specified-fields-using/m-p/1610584#M64586</guid>
      <dc:creator>JenniferBorlick</dc:creator>
      <dc:date>2025-04-30T20:01:01Z</dc:date>
    </item>
  </channel>
</rss>

