<?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 Return non-used domain values in Dashboard List in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/return-non-used-domain-values-in-dashboard-list/m-p/1145685#M5865</link>
    <description>&lt;P&gt;Good day all!&lt;/P&gt;&lt;P&gt;I have a dashboard set up that summarizes the current status of ongoing construction projects.&amp;nbsp; In my projects layer, I have a field for Inspector, which references a domain list consisting of all available inspectors.&amp;nbsp; I am attempting to set up a list widget that lists all of the available inspectors found within that domain that are not currently assigned to a project.&amp;nbsp; I have played around with the domain function in Arcade, but seem to be having trouble getting it to work properly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am curious if this is even a possibility, but I thought I would throw it out there to see if anyone had ever attempted something similar.&amp;nbsp; Any input you could provide would be most welcomed!&lt;/P&gt;</description>
    <pubDate>Fri, 18 Feb 2022 17:24:06 GMT</pubDate>
    <dc:creator>JeffMiller7</dc:creator>
    <dc:date>2022-02-18T17:24:06Z</dc:date>
    <item>
      <title>Return non-used domain values in Dashboard List</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/return-non-used-domain-values-in-dashboard-list/m-p/1145685#M5865</link>
      <description>&lt;P&gt;Good day all!&lt;/P&gt;&lt;P&gt;I have a dashboard set up that summarizes the current status of ongoing construction projects.&amp;nbsp; In my projects layer, I have a field for Inspector, which references a domain list consisting of all available inspectors.&amp;nbsp; I am attempting to set up a list widget that lists all of the available inspectors found within that domain that are not currently assigned to a project.&amp;nbsp; I have played around with the domain function in Arcade, but seem to be having trouble getting it to work properly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am curious if this is even a possibility, but I thought I would throw it out there to see if anyone had ever attempted something similar.&amp;nbsp; Any input you could provide would be most welcomed!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 17:24:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/return-non-used-domain-values-in-dashboard-list/m-p/1145685#M5865</guid>
      <dc:creator>JeffMiller7</dc:creator>
      <dc:date>2022-02-18T17:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Return non-used domain values in Dashboard List</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/return-non-used-domain-values-in-dashboard-list/m-p/1145725#M5866</link>
      <description>&lt;P&gt;This should be possible using a combination of the FeatureSetByPortalItem (or any of the other FeatureSet functions) and Schema. Schema allows you to get all of the coded domain values via the fields/domain properties.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var somelist = []

function myfilter(someval){
    return indexOf(somelist, someval) == -1
}

var coded_values = Schema($feature)['fields'][4]['domain']['codedValues']

for(var i in coded_values){
    Push(somelist, coded_values[i]['name'])
}

var fs = FeatureSetByPortalItem(Portal('PORTALURL'), "ITEMID", LYR_INDEX)

var in_use_list = []

for(var f in fs){
    Push(in_use_list, f.FIELDNAME)
}
return Filter(in_use_list, myfilter)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Feb 2022 18:17:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/return-non-used-domain-values-in-dashboard-list/m-p/1145725#M5866</guid>
      <dc:creator>HuubZwart</dc:creator>
      <dc:date>2022-02-18T18:17:53Z</dc:date>
    </item>
  </channel>
</rss>

