<?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: Dashboard Arcade expression to use data from 2 fields for a List Element in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-arcade-expression-to-use-data-from-2/m-p/1368590#M8914</link>
    <description>&lt;P&gt;Thank you very much, it worked like a charm!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnEsch1_0-1704917794501.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91125i2616578667ADCAE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnEsch1_0-1704917794501.png" alt="JohnEsch1_0-1704917794501.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2024 20:17:32 GMT</pubDate>
    <dc:creator>JohnEsch1</dc:creator>
    <dc:date>2024-01-10T20:17:32Z</dc:date>
    <item>
      <title>Dashboard Arcade expression to use data from 2 fields for a List Element</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-arcade-expression-to-use-data-from-2/m-p/1368499#M8911</link>
      <description>&lt;P&gt;I have an ArcGIS Dashboard and a List element where I want to use 2 separate fields: called&amp;nbsp;{Well_Name} and&amp;nbsp; {FacilityName}. By just putting in both fields I get an unsatisfactory list, where if there is not a Well_Name attribute, but a FacilityName attribute, it puts a NA in front of the&amp;nbsp;FacilityName. The opposite occurs if there is Well_Name attribute, but not a&amp;nbsp;FacilityName, by putting a N/A after the&amp;nbsp;Well_Name. There must be a way to populate a List element from 2 separate fields. Would this be easier as an Arcade expression in the web map popup or in the Dashboard?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnEsch1_0-1704910116075.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91094i626146551F1C6AA5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnEsch1_0-1704910116075.png" alt="JohnEsch1_0-1704910116075.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnEsch1_1-1704910278719.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91095i86122586FADB420D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnEsch1_1-1704910278719.png" alt="JohnEsch1_1-1704910278719.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:24:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-arcade-expression-to-use-data-from-2/m-p/1368499#M8911</guid>
      <dc:creator>JohnEsch1</dc:creator>
      <dc:date>2024-01-10T18:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard Arcade expression to use data from 2 fields for a List Element</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-arcade-expression-to-use-data-from-2/m-p/1368526#M8912</link>
      <description>&lt;P&gt;If you click "Enable" in the advanced formatting section, you can create your own arcade variables to use in your list. So if it's a case where both names could be populated, it might look something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var wellNameFormatted = Iif($datapoint.Well_Name == "N/A", "", $datapoint.Well_Name)
var facilityNameFormatted = Iif($datapoint.FacilityName == "N/A", "", $datapoint.FacilityName)

return {
  textColor: '',
  backgroundColor: '',
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
   attributes: {
     Well: wellNameFormatted,
     Facility: facilityNameFormatted
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then you would reference it in your list as {expression/Well}{expression/Facility}&lt;/P&gt;&lt;P&gt;Or if it's only possible for one or the other to have a name, you could do it with one variable like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var nameFormatted = Iif($datapoint.Well_Name == "N/A", $datapoint.FacilityName, $datapoint.Well_Name)

return {
  textColor: '',
  backgroundColor: '',
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
   attributes: {
     Name: nameFormatted
   }
}&lt;/LI-CODE&gt;&lt;P&gt;And just reference {expression/Name}&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 19:14:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-arcade-expression-to-use-data-from-2/m-p/1368526#M8912</guid>
      <dc:creator>marksm_macomb</dc:creator>
      <dc:date>2024-01-10T19:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard Arcade expression to use data from 2 fields for a List Element</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-arcade-expression-to-use-data-from-2/m-p/1368590#M8914</link>
      <description>&lt;P&gt;Thank you very much, it worked like a charm!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnEsch1_0-1704917794501.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91125i2616578667ADCAE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnEsch1_0-1704917794501.png" alt="JohnEsch1_0-1704917794501.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 20:17:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-arcade-expression-to-use-data-from-2/m-p/1368590#M8914</guid>
      <dc:creator>JohnEsch1</dc:creator>
      <dc:date>2024-01-10T20:17:32Z</dc:date>
    </item>
  </channel>
</rss>

