<?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: If else conditional search returning table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571312#M199081</link>
    <description>&lt;P&gt;Thank you for responding.&amp;nbsp; The search is taking forever to complete if i put where condition towards the end as you mentioned.&lt;BR /&gt;On the other hand, if&amp;nbsp; i&amp;nbsp; use eventName IN ( ) at the beginning, the search completes much faster.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Oct 2021 11:13:05 GMT</pubDate>
    <dc:creator>neerajs_81</dc:creator>
    <dc:date>2021-10-18T11:13:05Z</dc:date>
    <item>
      <title>If else conditional search returning table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571295#M199070</link>
      <description>&lt;P&gt;Hello,&amp;nbsp; i need to configure a search using If else condition but the search outputs in a table format.&amp;nbsp; Can someone please assist ?&lt;BR /&gt;&lt;BR /&gt;Original snippet of the search :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 sourcetype=index1:xyz eventName IN( GetAction, PutAction,ModifyAction) | [Search...]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Requirement :&amp;nbsp; Separate using IF-else as follows:&lt;BR /&gt;&lt;BR /&gt;index=index1 sourcetype=xyz IF eventName in ( PutAction, GetAction) then &lt;STRONG&gt;[ run search 1 ]&lt;/STRONG&gt; else if eventName in (ModifyAction ) then &lt;STRONG&gt;[run search 2]&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Please note both search1 and 2&amp;nbsp; returns results in Table format.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 10:05:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571295#M199070</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2021-10-18T10:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: If else conditional search returning table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571297#M199071</link>
      <description>&lt;LI-CODE lang="markup"&gt;search 1 | where eventName="GetAction" OR eventName="PutAction"
| append [search 2 | where eventName="ModifyAction"]&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 18 Oct 2021 10:21:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571297#M199071</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-10-18T10:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: If else conditional search returning table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571312#M199081</link>
      <description>&lt;P&gt;Thank you for responding.&amp;nbsp; The search is taking forever to complete if i put where condition towards the end as you mentioned.&lt;BR /&gt;On the other hand, if&amp;nbsp; i&amp;nbsp; use eventName IN ( ) at the beginning, the search completes much faster.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 11:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571312#M199081</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2021-10-18T11:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: If else conditional search returning table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571314#M199083</link>
      <description>&lt;P&gt;The problem with your question is that there is not enough detail about how the different searches and events returned by those searches relate to each other. Without this sort of detail, it is difficult to suggest something which might help.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 11:17:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571314#M199083</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-10-18T11:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: If else conditional search returning table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571315#M199084</link>
      <description>&lt;P&gt;I will DM you. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 11:18:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-else-conditional-search-returning-table/m-p/571315#M199084</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2021-10-18T11:18:30Z</dc:date>
    </item>
  </channel>
</rss>

