<?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: How to search based on variable?  | search no = variable in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681410#M232852</link>
    <description>&lt;P&gt;You didn't tell what is your issue. You just told how you are trying to solve it! In splunk there are usually several ways to solve those and some are much better that other. Usually people whom are not familiar with splunk try to use the second option ....&lt;/P&gt;&lt;P&gt;You can see e.g.&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-return-a-single-value-from-a-subsearch-into-eval/m-p/681377#M232833" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-return-a-single-value-from-a-subsearch-into-eval/m-p/681377#M232833&lt;/A&gt;&amp;nbsp;how to use "variables" on search etc.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2024 15:15:45 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2024-03-20T15:15:45Z</dc:date>
    <item>
      <title>How to search based on variable?  | search no = variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681383#M232835</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;How to search based on variable?&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If select contains "many", then search no IN (1 to 30),&amp;nbsp; else search NO 7&lt;BR /&gt;&lt;BR /&gt;| eval&amp;nbsp; &lt;STRONG&gt;variable&lt;/STRONG&gt; = if(select="many", "(1-30)", "7")&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;| search no IN &lt;STRONG&gt;variable&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;==&amp;gt;&amp;nbsp; &amp;nbsp; This doesn't work&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;| search no IN &lt;STRONG&gt;(7)&amp;nbsp;&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;==&amp;gt;&amp;nbsp; &amp;nbsp; This works&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;| search no IN &lt;STRONG&gt;(1,2,3,4,5,6,7,8,9,10,11)&amp;nbsp;&lt;/STRONG&gt; &amp;nbsp;&lt;STRONG&gt;==&amp;gt;&amp;nbsp; &amp;nbsp; This works,&amp;nbsp; &amp;nbsp;but I have to manually put the number&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;| where variable IN &lt;STRONG&gt;(1,2,3,4,5,6,7,8,9,10,11)&amp;nbsp;&lt;/STRONG&gt;==&amp;gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;This&amp;nbsp; does not work&lt;/STRONG&gt; ( although the Splunk documentation said it should work)&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SCS/current/SearchReference/WhereCommandOverview" target="_blank"&gt;https://docs.splunk.com/Documentation/SCS/current/SearchReference/WhereCommandOverview&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;| regex no= &lt;STRONG&gt;"([1-30])"&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;==&amp;gt;&amp;nbsp; &amp;nbsp;This works&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;| regex no = &lt;STRONG&gt;variable&amp;nbsp; &amp;nbsp;==&amp;gt;&amp;nbsp; &amp;nbsp;This does not work&amp;nbsp; &amp;nbsp;(variable)&lt;BR /&gt;&lt;BR /&gt;Thank you for your help&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 12:53:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681383#M232835</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-20T12:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to search based on variable?  | search no = variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681391#M232840</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;as you can see this depends on case. You must also understand that SPL is not a programming language and for that reason it works differently than those.&lt;/P&gt;&lt;P&gt;What is your use case / issue which you are trying to solve?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 13:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681391#M232840</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-20T13:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to search based on variable?  | search no = variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681402#M232845</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I need to filter using search based on a condition&lt;BR /&gt;instead of&amp;nbsp;&amp;nbsp;| search no = "abc"&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I need to make&amp;nbsp; "abc" as a variable&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Marius&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 14:34:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681402#M232845</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-20T14:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to search based on variable?  | search no = variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681410#M232852</link>
      <description>&lt;P&gt;You didn't tell what is your issue. You just told how you are trying to solve it! In splunk there are usually several ways to solve those and some are much better that other. Usually people whom are not familiar with splunk try to use the second option ....&lt;/P&gt;&lt;P&gt;You can see e.g.&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-return-a-single-value-from-a-subsearch-into-eval/m-p/681377#M232833" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-return-a-single-value-from-a-subsearch-into-eval/m-p/681377#M232833&lt;/A&gt;&amp;nbsp;how to use "variables" on search etc.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 15:15:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681410#M232852</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-20T15:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to search based on variable?  | search no = variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681411#M232853</link>
      <description>&lt;P&gt;&lt;BR /&gt;Thanks for your suggestion&lt;BR /&gt;I tried to simplify, but this is what I am trying to solve:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-drop-down-condition/m-p/681366#M232829" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-drop-down-condition/m-p/681366#M232829&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 15:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681411#M232853</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-20T15:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to search based on variable?  | search no = variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681413#M232855</link>
      <description>&lt;P&gt;Again you just told how you are trying to solve something, but you didn't tell what is your real issue?&lt;/P&gt;&lt;P&gt;Could you describe what you are looking with this dashboard?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 15:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-based-on-variable-search-no-variable/m-p/681413#M232855</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-20T15:30:46Z</dc:date>
    </item>
  </channel>
</rss>

