<?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: trying to use the include function, but I get zero results in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-use-the-include-function-but-i-get-zero/m-p/1289773#M7822</link>
    <description>&lt;P&gt;Try these two changes:&lt;/P&gt;&lt;P&gt;Line 6&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (Includes(L, x)){&lt;/LI-CODE&gt;&lt;P&gt;Line 21&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        middleText: "All",&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 16 May 2023 19:59:36 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2023-05-16T19:59:36Z</dc:date>
    <item>
      <title>trying to use the include function, but I get zero results</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-use-the-include-function-but-i-get-zero/m-p/1289764#M7821</link>
      <description>&lt;P&gt;In the dashborad, one panel(p1)&amp;nbsp; controls another panel(P2)&lt;/P&gt;&lt;P&gt;P1 has a list of numbers ( 9-18)&amp;nbsp; when a number is selected it will display that number along with other information.&amp;nbsp; That works fine&lt;/P&gt;&lt;P&gt;On the P1 list is also an option for 'all'&amp;nbsp; I want to display 'all' when that is selected but it defaults to one of the numbers on the list.&amp;nbsp; I have tried several variations in Arcade, this seems logical but it does not work. Am I using 'include' wrong&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var dt_tmstp = $datapoint.WeekStartDate
var dt = (Month(dt_tmstp)+1) + '-' + Day(dt_tmstp) + '-' + Year(dt_tmstp)
var L =[9,10,11,12,13,14,15,16,17,18]
var x = ($datapoint["BiWeek"])

if Includes(L, x){
return {
    textColor:'black',
    backgroundColor:'#9ab9b5',
    middleText: $datapoint["BiWeek"],
    middleTextColor: '',
    middleTextOutlineColor: '',
    middleTextMaxSize: 'large',
    bottomText: 'biweek period start: ' + dt,
 }
}
 else{
    return {
        textColor:'black',
        backgroundColor:'#9ab9b5',
        middleText:["All"],
        middleTextColor: '',
        middleTextOutlineColor: '',
        middleTextMaxSize: 'large',
      } 
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 19:43:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-use-the-include-function-but-i-get-zero/m-p/1289764#M7821</guid>
      <dc:creator>jasongraham</dc:creator>
      <dc:date>2023-05-16T19:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: trying to use the include function, but I get zero results</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-use-the-include-function-but-i-get-zero/m-p/1289773#M7822</link>
      <description>&lt;P&gt;Try these two changes:&lt;/P&gt;&lt;P&gt;Line 6&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (Includes(L, x)){&lt;/LI-CODE&gt;&lt;P&gt;Line 21&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        middleText: "All",&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 16 May 2023 19:59:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-use-the-include-function-but-i-get-zero/m-p/1289773#M7822</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-05-16T19:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: trying to use the include function, but I get zero results</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-use-the-include-function-but-i-get-zero/m-p/1289794#M7825</link>
      <description>&lt;P&gt;Thanks for that, it does return the approriate number, but not the 'all', it defaults to another number&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 20:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/trying-to-use-the-include-function-but-i-get-zero/m-p/1289794#M7825</guid>
      <dc:creator>jasongraham</dc:creator>
      <dc:date>2023-05-16T20:40:26Z</dc:date>
    </item>
  </channel>
</rss>

