<?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: filtering search results not working as expected in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/filtering-search-results-not-working-as-expected/m-p/753116#M119581</link>
    <description>&lt;P&gt;The rest calls returns those fields but the values are empty. So if you do len() on them you'd get a result of zero, not an empty value.&lt;/P&gt;&lt;P&gt;So if you want to find empty values you need to compare the field to a zero-length string.&lt;/P&gt;&lt;PRE&gt;| search srchIndexesDefault!=""&lt;/PRE&gt;</description>
    <pubDate>Mon, 15 Sep 2025 19:07:39 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-09-15T19:07:39Z</dc:date>
    <item>
      <title>filtering search results not working as expected</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/filtering-search-results-not-working-as-expected/m-p/753108#M119576</link>
      <description>&lt;P&gt;I have a not-very-complicated query that returns a table of my roles and associated default search indexes. One role has no default search index (srchIndexesDefault), so that role's row contains no value for srchIndexesDefault. So far so good.&lt;/P&gt;&lt;P&gt;Now, I want to filter out rows with no srchIndexesDefault value. Any one of the last three (commented out) lines in this query seem like they should do exactly that. But only the first of the three does. The other two produce no errors, but they also have no apparent effect, and I'd like to understand why. (The results you get from this query will depend on what roles and indexes you have access to.)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rest /services/authorization/roles 
| mvexpand srchIndexesDefault 
| table title, srchIndexesDefault, defaultApp 
| rename title as roles 
| join roles 
    [| rest /services/authentication/users 
    | search splunk_server=splunksearch* 
    | table title, roles, defaultApp 
    | mvexpand roles ]
| table title, roles, srchIndexesDefault, defaultApp
``` | regex srchIndexesDefault!="^$" ```       ``` &amp;lt;--- This works ```
``` | search srchIndexesDefault=* ```          ``` &amp;lt;--- This doesn't work ```
``` | where isnotnull(srchIndexesDefault) ```  ``` &amp;lt;--- This doesn't work ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 15:46:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/filtering-search-results-not-working-as-expected/m-p/753108#M119576</guid>
      <dc:creator>utoddl</dc:creator>
      <dc:date>2025-09-15T15:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: filtering search results not working as expected</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/filtering-search-results-not-working-as-expected/m-p/753116#M119581</link>
      <description>&lt;P&gt;The rest calls returns those fields but the values are empty. So if you do len() on them you'd get a result of zero, not an empty value.&lt;/P&gt;&lt;P&gt;So if you want to find empty values you need to compare the field to a zero-length string.&lt;/P&gt;&lt;PRE&gt;| search srchIndexesDefault!=""&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Sep 2025 19:07:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/filtering-search-results-not-working-as-expected/m-p/753116#M119581</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-09-15T19:07:39Z</dc:date>
    </item>
  </channel>
</rss>

