<?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: Using Parameter in Search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/679344#M232230</link>
    <description>&lt;P&gt;Also, if NAME field is available in raw events at search time, you should include the subsearch in index search to improve performance. &amp;nbsp;Like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=foo NAME IN (
    [| makeresults 
    |  eval search="tas1,task2,task3"])&lt;/LI-CODE&gt;&lt;P&gt;If NAME is populated by some calculation from SPL, you need&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;'s full solution. &amp;nbsp;But I believe you will need format command for the meta keyword &lt;U&gt;search&lt;/U&gt; to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Mar 2024 21:27:30 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2024-03-01T21:27:30Z</dc:date>
    <item>
      <title>Using Parameter in Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/679187#M232175</link>
      <description>&lt;P&gt;I am trying to use parameter into the search using IN condition.&amp;nbsp; Query is retuning results if I put data directly into the search but my dashboard logic require to use parameter .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;........&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval tasks = task1,task2,task3
| search NAME IN (tasks)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 02 Mar 2024 07:57:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/679187#M232175</guid>
      <dc:creator>splunkuser320</dc:creator>
      <dc:date>2024-03-02T07:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using Parameter in Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/679191#M232176</link>
      <description>&lt;P&gt;Use a subsearch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=foo
| search NAME IN (
    [| makeresults 
    |  eval search="task1,task2,task3"])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2024 01:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/679191#M232176</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-03-02T01:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using Parameter in Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/679344#M232230</link>
      <description>&lt;P&gt;Also, if NAME field is available in raw events at search time, you should include the subsearch in index search to improve performance. &amp;nbsp;Like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=foo NAME IN (
    [| makeresults 
    |  eval search="tas1,task2,task3"])&lt;/LI-CODE&gt;&lt;P&gt;If NAME is populated by some calculation from SPL, you need&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;'s full solution. &amp;nbsp;But I believe you will need format command for the meta keyword &lt;U&gt;search&lt;/U&gt; to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 21:27:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/679344#M232230</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-03-01T21:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using Parameter in Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/679426#M232271</link>
      <description>&lt;P&gt;If this is dashboard logic, where do your parameters come from, presumably they are tokens from somewhere.&lt;/P&gt;&lt;P&gt;If so, you can just construct the token appropriately so you have&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search $my_token$&lt;/LI-CODE&gt;&lt;P&gt;where my_token is constructed elsewhere. It is from a multiselect dropdown? If so, just use the settings in the multiselect option to set the token prefix/delimiter values&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2024 22:04:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/679426#M232271</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-03-03T22:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Parameter in Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680421#M232560</link>
      <description>&lt;P&gt;I have comma separated list in Lookup table so after reading value from lookup table, can I do following ?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=foo
| eval NAME_LIST="task1,task2,task3"
| search NAME IN (NAME_LIST)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 17:04:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680421#M232560</guid>
      <dc:creator>splunkuser320</dc:creator>
      <dc:date>2024-03-12T17:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using Parameter in Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680453#M232573</link>
      <description>&lt;P&gt;How are you reading the values from the lookup table - you didn't say if this was a multiselect dropdown input?&lt;/P&gt;&lt;P&gt;No you cannot do what you suggest here. "parameters" generally mean tokens and multiselect specifically support this type of case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 00:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680453#M232573</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-03-13T00:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Parameter in Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680469#M232579</link>
      <description>&lt;P&gt;You can &lt;EM&gt;sort of&lt;/EM&gt; do that. &amp;nbsp;But why? &amp;nbsp;This gets more convoluted that your problem warrants. &amp;nbsp;Your OP says you are doing selector in dashboard logic. &amp;nbsp;As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;said, that's precisely what multi-selector token is for.&lt;/P&gt;&lt;P&gt;But if you really need a CSV file to do so, name the column "NAME" instead of NAME_LIST. &amp;nbsp;Then, split the value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search
    [inputlookup csv.csv
    | eval NAME = split(NAME, ",")]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't really do an IN operation but is semantically equivalent.&lt;/P&gt;&lt;P&gt;Here's an emulation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults format=csv data="NAME
task2
task4"
| search
    [inputlookup csv.csv
    | eval NAME = split(NAME, ",")]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your sample CSV row will give you&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;NAME&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;task2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 13 Mar 2024 01:40:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680469#M232579</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-03-13T01:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Parameter in Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680479#M232581</link>
      <description>&lt;P&gt;This part won't work, as search can't take another field as it's constraint&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval NAME_LIST="task1,task2,task3"
| search NAME IN (NAME_LIST)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 03:59:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680479#M232581</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-03-13T03:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Parameter in Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680550#M232614</link>
      <description>&lt;P class="lia-align-left"&gt;Thanks for your help. Solution is working as expected.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 13:48:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Parameter-in-Search/m-p/680550#M232614</guid>
      <dc:creator>splunkuser320</dc:creator>
      <dc:date>2024-03-13T13:48:46Z</dc:date>
    </item>
  </channel>
</rss>

