<?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: Is there a way to populate an &amp;quot;IN (...)&amp;quot; with items from subsearch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608152#M211455</link>
    <description>&lt;P&gt;Since the &lt;FONT face="courier new,courier"&gt;IN&lt;/FONT&gt; operator is mapped to a series of &lt;FONT face="courier new,courier"&gt;OR&lt;/FONT&gt;s under the covers, use the &lt;FONT face="courier new,courier"&gt;OR&lt;/FONT&gt; output produced by the subsearch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=x accountid [ search index=special_accounts | rename accountid as query | fields query | format ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2022 18:32:22 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-08-03T18:32:22Z</dc:date>
    <item>
      <title>Is there a way to populate an "IN (...)" with items from subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608150#M211453</link>
      <description>&lt;P&gt;Is there a way to populate the items in an "IN" statement with the results of a sub query?&amp;nbsp; I've tried several variations.&lt;/P&gt;
&lt;P&gt;index=x accountid IN ( [ search index=special_accounts | rename accountid as query ] )&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 17:49:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608150#M211453</guid>
      <dc:creator>spinnerdog</dc:creator>
      <dc:date>2022-08-03T17:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to populate an "IN (...)" with items from subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608152#M211455</link>
      <description>&lt;P&gt;Since the &lt;FONT face="courier new,courier"&gt;IN&lt;/FONT&gt; operator is mapped to a series of &lt;FONT face="courier new,courier"&gt;OR&lt;/FONT&gt;s under the covers, use the &lt;FONT face="courier new,courier"&gt;OR&lt;/FONT&gt; output produced by the subsearch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=x accountid [ search index=special_accounts | rename accountid as query | fields query | format ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 18:32:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608152#M211455</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-08-03T18:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to populate an "IN (...)" with items from subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608153#M211456</link>
      <description>&lt;P class="lia-align-left"&gt;Okay, thanks.&amp;nbsp; Was trying to work around using the format command, but maybe there is a way to use it differently.&amp;nbsp; How can you make the format command produce output like.&lt;/P&gt;&lt;P class="lia-align-left"&gt;[search index=special_accounts | table accountid | format mvsep=AND ]&lt;/P&gt;&lt;P class="lia-align-left"&gt;where the desired output would use != instead of =&lt;/P&gt;&lt;P class="lia-align-left"&gt;(accountid!=xxx AND accountid!=yyy AND ...)&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 18:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608153#M211456</guid>
      <dc:creator>spinnerdog</dc:creator>
      <dc:date>2022-08-03T18:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to populate an "IN (...)" with items from subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608158#M211459</link>
      <description>&lt;P&gt;Why avoid &lt;FONT face="courier new,courier"&gt;format&lt;/FONT&gt;?&amp;nbsp; It produces the same thing that &lt;FONT face="courier new,courier"&gt;IN&lt;/FONT&gt; does.&lt;/P&gt;&lt;P&gt;You can change &lt;FONT face="courier new,courier"&gt;OR&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;AND&lt;/FONT&gt; in &lt;FONT face="courier new,courier"&gt;format&lt;/FONT&gt;, but there's no way I can find to change &lt;FONT face="courier new,courier"&gt;=&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;!=&lt;/FONT&gt;.&amp;nbsp; However, "&lt;FONT face="courier new,courier"&gt;(foo!=bar AND foo!=baz)&lt;/FONT&gt;" is not the same as "&lt;FONT face="courier new,courier"&gt;foo IN (bar, baz)&lt;/FONT&gt;", which is what I thought the OP wanted.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 18:31:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608158#M211459</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-08-03T18:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to populate an "IN (...)" with items from subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608160#M211461</link>
      <description>&lt;P&gt;correct, its just the inverse of what the format command produces.&amp;nbsp; I have a list of valid values and I want the events with invalid values.&amp;nbsp; Was hoping to use something line NOT IN (...).&amp;nbsp; But that's not an option and I also can't find a way to change = to "!=".&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 18:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608160#M211461</guid>
      <dc:creator>spinnerdog</dc:creator>
      <dc:date>2022-08-03T18:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to populate an "IN (...)" with items from subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608180#M211471</link>
      <description>&lt;P&gt;Oh!&amp;nbsp; That's easy!&amp;nbsp; Just negate the subsearch.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=x accountid NOT [ search index=special_accounts | rename accountid as query | fields query | format ]&lt;/LI-CODE&gt;&lt;P&gt;It'll give you &lt;FONT face="courier new,courier"&gt;NOT (foo=bar OR foo=baz)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 20:18:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-populate-an-quot-IN-quot-with-items-from/m-p/608180#M211471</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-08-03T20:18:10Z</dc:date>
    </item>
  </channel>
</rss>

