<?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 inputlookup - How to search through all lookup fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239267#M71081</link>
    <description>&lt;P&gt;Hi, Splunkers!&lt;/P&gt;

&lt;P&gt;Looking for easy way to get results from any lookup table like it might be:  | inputlookup mylookup | search "keyword" &lt;BR /&gt;
Of course this doesn't work, as I didn't specify field name. &lt;BR /&gt;
But how could I get raws from my table where any of the field matches my request. &lt;BR /&gt;
This might also be handy when I don't know or won't specify a field name or while searching through different tables with different field names simultaneously.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2016 16:15:20 GMT</pubDate>
    <dc:creator>evelenke</dc:creator>
    <dc:date>2016-08-17T16:15:20Z</dc:date>
    <item>
      <title>inputlookup - How to search through all lookup fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239267#M71081</link>
      <description>&lt;P&gt;Hi, Splunkers!&lt;/P&gt;

&lt;P&gt;Looking for easy way to get results from any lookup table like it might be:  | inputlookup mylookup | search "keyword" &lt;BR /&gt;
Of course this doesn't work, as I didn't specify field name. &lt;BR /&gt;
But how could I get raws from my table where any of the field matches my request. &lt;BR /&gt;
This might also be handy when I don't know or won't specify a field name or while searching through different tables with different field names simultaneously.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 16:15:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239267#M71081</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2016-08-17T16:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - How to search through all lookup fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239268#M71082</link>
      <description>&lt;P&gt;Hi evelenke, &lt;/P&gt;

&lt;P&gt;I like to use something like this to output fields out of a lookuptable when certain conditions match:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| lookup ip_info.csv src_ip OUTPUT subnet_mask, user, device
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;"src_ip" is the field in the lookuptable you want to match with the field in your existing search (this fields name needs to be also "src_ip") (PS: if your existing field is "source_ip" you could rename it before the lookup to "src_ip" and then after the lookup you could rename it back)&lt;/P&gt;

&lt;P&gt;"OUTPUT" is the command after which the fields should follow you want to read out of the lookup-file.&lt;BR /&gt;
"subnet-mask", "user", "device" are the actual field names in the lookup table&lt;/P&gt;

&lt;P&gt;Best regards, &lt;BR /&gt;
pyro_wood&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239268#M71082</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2020-09-29T10:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - How to search through all lookup fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239269#M71083</link>
      <description>&lt;P&gt;try this - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup mylookup | search keyword="value"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i have a mapZipcode lookup configured on my system and to look for Florida, and this works fine - &lt;BR /&gt;
| inputlookup mapZipCode |  search city="Florida"&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 16:40:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239269#M71083</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-08-17T16:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - How to search through all lookup fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239270#M71084</link>
      <description>&lt;P&gt;Thanks guys, but...&lt;BR /&gt;
Let's say I have feeds from Inventory DB and I'd like to create view in Splunk where I can choose any category of assets (separate resulting csv tables, like inventory_pc, inventory_vm etc) and define some keyword and it will be looking for that word.  Fields for each category have something different from other category - e.g. name of assets - 'PC Name', 'VM Name', 'Device Name', some categories have unique fields - you'll never know what to expect.  Panel in my form should have unified search: | inputlookup $category$ | search $keyword$ $search$.&lt;BR /&gt;&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/155182-capture-form.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;How can I achieve this?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239270#M71084</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2020-09-29T10:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - How to search through all lookup fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239271#M71085</link>
      <description>&lt;P&gt;i am not sure if i understand your task correctly, but, lets check this - &lt;BR /&gt;
| inputlookup mylookup | search mylookup_column_name=$keyword$&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:39:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239271#M71085</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-09-29T10:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - How to search through all lookup fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239272#M71086</link>
      <description>&lt;P&gt;Assuming  $category$ is correctly giving the lookup table name to use, give this a shot&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup $category$ | eval raw="" | foreach * [eval raw=raw.",".coalesce('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',"") ] | search raw="*$keyword$*" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is the different between your keyword and Type search textbox value?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 18:35:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239272#M71086</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-17T18:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - How to search through all lookup fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239273#M71087</link>
      <description>&lt;P&gt;I think somesoni2 has the right of it - combine the data into a giant string that you then search. Mine is just slightly different but uses the same concept&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup mylist | eval foo="" | foreach * [ eval foo = foo."|".&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;] | search foo= *myterm* | fields - foo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I added the pipes just because /shrug. Alternatively I suppose you could populate a dropdown with the fields from whichever list the user selects. I'd do that with something like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup $category$ | transpose | table column
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Aug 2016 02:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239273#M71087</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2016-08-18T02:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - How to search through all lookup fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239274#M71088</link>
      <description>&lt;P&gt;Great, this approach works!&lt;BR /&gt;
I should examine search commands more diligently )&lt;BR /&gt;
Great suggestion, Runals, I'll add this dropdown to my form.&lt;BR /&gt;
As for "Type search" - this is just for situations when user needs to add something to search directly in this view.&lt;BR /&gt;
Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 08:31:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/239274#M71088</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2016-08-18T08:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - How to search through all lookup fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/643616#M222951</link>
      <description>&lt;P&gt;can you explain the point of coalesce() in the solution? Are you trying to account for null fields with blank instead of null?&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 11:47:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-How-to-search-through-all-lookup-fields/m-p/643616#M222951</guid>
      <dc:creator>makelovenotwar</dc:creator>
      <dc:date>2023-05-17T11:47:31Z</dc:date>
    </item>
  </channel>
</rss>

