<?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: Dynamic Search Query Based on Field Value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-Search-Query-Based-on-Field-Value/m-p/514593#M144444</link>
    <description>&lt;P&gt;A few ways to address this&lt;/P&gt;&lt;P&gt;1. Have a lookup file where you have the latest version in a field called version and then the query does&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ | inputlookup version.csv | table version ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;but this will need updating, but would be useful if you have many queries that use this field.&lt;/P&gt;&lt;P&gt;2. Run a saved search that searches for the latest version once a day and updates the value in the CSV file used above - makes (1) automated&lt;/P&gt;&lt;P&gt;3. Run the subsearch like&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;refers to, but that will mean that you will have to search all data to get the version before then using that output to search only the latest data set - depending on the data size it could be inefficient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Aug 2020 05:23:15 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2020-08-18T05:23:15Z</dc:date>
    <item>
      <title>Dynamic Search Query Based on Field Value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-Search-Query-Based-on-Field-Value/m-p/514569#M144431</link>
      <description>&lt;P&gt;I'm trying to create a search that always looks for the responses from the latest version of my app. The `version` field is already defined and the values are something like 1.0, 1.1 or 1.2.&lt;/P&gt;&lt;P&gt;Currently, anytime I update my app I need to update my search query to look for the new version (version=1.3)&lt;/P&gt;&lt;P&gt;I want to do something like "version=my_latest_version" where my_latest_version is a dynamic value that returns the max value of all current "version" field values.&lt;/P&gt;&lt;P&gt;is this possible?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 00:52:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-Search-Query-Based-on-Field-Value/m-p/514569#M144431</guid>
      <dc:creator>normand1</dc:creator>
      <dc:date>2020-08-18T00:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Search Query Based on Field Value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-Search-Query-Based-on-Field-Value/m-p/514580#M144436</link>
      <description>&lt;P&gt;| eventstats max(version) as&amp;nbsp;&lt;SPAN&gt;my_latest_version&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;yes, it is possible.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 02:40:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-Search-Query-Based-on-Field-Value/m-p/514580#M144436</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-18T02:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Search Query Based on Field Value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-Search-Query-Based-on-Field-Value/m-p/514593#M144444</link>
      <description>&lt;P&gt;A few ways to address this&lt;/P&gt;&lt;P&gt;1. Have a lookup file where you have the latest version in a field called version and then the query does&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ | inputlookup version.csv | table version ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;but this will need updating, but would be useful if you have many queries that use this field.&lt;/P&gt;&lt;P&gt;2. Run a saved search that searches for the latest version once a day and updates the value in the CSV file used above - makes (1) automated&lt;/P&gt;&lt;P&gt;3. Run the subsearch like&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;refers to, but that will mean that you will have to search all data to get the version before then using that output to search only the latest data set - depending on the data size it could be inefficient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 05:23:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-Search-Query-Based-on-Field-Value/m-p/514593#M144444</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-08-18T05:23:15Z</dc:date>
    </item>
  </channel>
</rss>

