<?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 How to add a query parameter conditionally? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-query-parameter-conditionally/m-p/430117#M122984</link>
    <description>&lt;P&gt;I'd like to conditionally add a parameter to my Splunk query based on the version number of my application. &lt;/P&gt;

&lt;P&gt;I have an "uploadType" input that I want to use, but only for events where the app version is over a certain number because the old versions do not contains this field.&lt;/P&gt;

&lt;P&gt;Something like:&lt;/P&gt;

&lt;P&gt;if appVersion &amp;gt;= 10.0 &lt;BR /&gt;
then include uploadType=$uploadType$,&lt;BR /&gt;
otherwise don't filter this field.&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;</description>
    <pubDate>Wed, 05 Dec 2018 21:53:19 GMT</pubDate>
    <dc:creator>mamerige</dc:creator>
    <dc:date>2018-12-05T21:53:19Z</dc:date>
    <item>
      <title>How to add a query parameter conditionally?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-query-parameter-conditionally/m-p/430117#M122984</link>
      <description>&lt;P&gt;I'd like to conditionally add a parameter to my Splunk query based on the version number of my application. &lt;/P&gt;

&lt;P&gt;I have an "uploadType" input that I want to use, but only for events where the app version is over a certain number because the old versions do not contains this field.&lt;/P&gt;

&lt;P&gt;Something like:&lt;/P&gt;

&lt;P&gt;if appVersion &amp;gt;= 10.0 &lt;BR /&gt;
then include uploadType=$uploadType$,&lt;BR /&gt;
otherwise don't filter this field.&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 21:53:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-query-parameter-conditionally/m-p/430117#M122984</guid>
      <dc:creator>mamerige</dc:creator>
      <dc:date>2018-12-05T21:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a query parameter conditionally?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-query-parameter-conditionally/m-p/430118#M122985</link>
      <description>&lt;P&gt;Assuming you want to include the filters base search of your panels, you could do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search (appVersion&amp;gt;=10.0 AND uploadType=$uploadType$) OR (appVersion&amp;lt;10.0) | rest of your search
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Dec 2018 06:10:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-query-parameter-conditionally/m-p/430118#M122985</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-12-06T06:10:02Z</dc:date>
    </item>
  </channel>
</rss>

