<?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 Using arcade to filter list in dashboard in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-filter-list-in-dashboard/m-p/1504442#M60169</link>
    <description>&lt;P&gt;Hello! I am trying to use an arcade expression to isolate features that contain carriage returns for a certain field within a list on my dashboard.&amp;nbsp; Possibly using '\r.' As of right now, I've tried a few things like the Find function, but no luck yet. I would love some help on this! Once again, I would like to highlight features that have carriage returns in their NAME field, not filter them out.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2024 19:55:31 GMT</pubDate>
    <dc:creator>sophered</dc:creator>
    <dc:date>2024-07-11T19:55:31Z</dc:date>
    <item>
      <title>Using arcade to filter list in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-filter-list-in-dashboard/m-p/1504442#M60169</link>
      <description>&lt;P&gt;Hello! I am trying to use an arcade expression to isolate features that contain carriage returns for a certain field within a list on my dashboard.&amp;nbsp; Possibly using '\r.' As of right now, I've tried a few things like the Find function, but no luck yet. I would love some help on this! Once again, I would like to highlight features that have carriage returns in their NAME field, not filter them out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 19:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-filter-list-in-dashboard/m-p/1504442#M60169</guid>
      <dc:creator>sophered</dc:creator>
      <dc:date>2024-07-11T19:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using arcade to filter list in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-filter-list-in-dashboard/m-p/1504539#M60173</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/807073"&gt;@sophered&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this Arcade expression that highlights features with carriage returns in the NAME field:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var nameField = $feature.NAME;
var carriageReturnPosition = Find("\r", nameField);

// Check if a carriage return character is found in the NAME field
if (carriageReturnPosition != -1) {
    // Return a custom message or value to indicate the presence of a carriage return
    return "Contains Carriage Return";
} else {
    // Return a different message or value to indicate no carriage return
    return "No Carriage Return";
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 23:01:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-filter-list-in-dashboard/m-p/1504539#M60173</guid>
      <dc:creator>RickeyFight</dc:creator>
      <dc:date>2024-07-11T23:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using arcade to filter list in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-filter-list-in-dashboard/m-p/1505390#M60213</link>
      <description>&lt;P&gt;Hello, I adjusted accordingly to be applicable to my data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;var portal = Portal('portal url')&lt;BR /&gt;var fs = FeatureSetByPortalItem(portal, "itemid", 0, ['STREETNAME'],false)&lt;BR /&gt;var carriageReturnPosition = Find("\r", fs);&lt;BR /&gt;if (carriageReturnPosition != -1) {&lt;BR /&gt;return Filter(fs, carriageReturnPosition)&lt;BR /&gt;} else {&lt;BR /&gt;return "No Carriage Returns in Street Names"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I am doing this in a data expression for the list element. However, when I run the test, it is fine BUT when i try to select the expression, it says that it is unable to execute the arcade expression. What am I doing wrong, how do i make these display within the list element&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 14:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-filter-list-in-dashboard/m-p/1505390#M60213</guid>
      <dc:creator>sophered</dc:creator>
      <dc:date>2024-07-15T14:12:50Z</dc:date>
    </item>
  </channel>
</rss>

