<?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 Performing a lookup using a string literal instead of a field name in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Performing-a-lookup-using-a-string-literal-instead-of-a-field/m-p/532850#M150535</link>
    <description>&lt;P&gt;I'm performing a lookup against a csv and need to use two columns (description and function) to return the correct value. However, I have a case where I need to explicitly specify the function, while using a description value from an event. Here's a lookup that works for me:&lt;/P&gt;&lt;P&gt;| lookup products.csv ProductDescription as description, ProductFunction as function OUTPUTNEW Name as ProductName&lt;/P&gt;&lt;P&gt;What I need to do is this:&lt;/P&gt;&lt;P&gt;| lookup products.csv ProductDescription as description, &lt;STRONG&gt;ProductFunction as "Kitchen Appliance"&lt;/STRONG&gt; OUTPUTNEW Name as ProductName&lt;/P&gt;&lt;P&gt;When the event happens to contain "Kitchen Appliance" as the function, the lookup works, but if I explicitly specify "Kitchen Appliance" as the lookup value, nothing is returned. Is this usage supported?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2020 17:06:36 GMT</pubDate>
    <dc:creator>AlexBryant</dc:creator>
    <dc:date>2020-12-11T17:06:36Z</dc:date>
    <item>
      <title>Performing a lookup using a string literal instead of a field name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performing-a-lookup-using-a-string-literal-instead-of-a-field/m-p/532850#M150535</link>
      <description>&lt;P&gt;I'm performing a lookup against a csv and need to use two columns (description and function) to return the correct value. However, I have a case where I need to explicitly specify the function, while using a description value from an event. Here's a lookup that works for me:&lt;/P&gt;&lt;P&gt;| lookup products.csv ProductDescription as description, ProductFunction as function OUTPUTNEW Name as ProductName&lt;/P&gt;&lt;P&gt;What I need to do is this:&lt;/P&gt;&lt;P&gt;| lookup products.csv ProductDescription as description, &lt;STRONG&gt;ProductFunction as "Kitchen Appliance"&lt;/STRONG&gt; OUTPUTNEW Name as ProductName&lt;/P&gt;&lt;P&gt;When the event happens to contain "Kitchen Appliance" as the function, the lookup works, but if I explicitly specify "Kitchen Appliance" as the lookup value, nothing is returned. Is this usage supported?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 17:06:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performing-a-lookup-using-a-string-literal-instead-of-a-field/m-p/532850#M150535</guid>
      <dc:creator>AlexBryant</dc:creator>
      <dc:date>2020-12-11T17:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Performing a lookup using a string literal instead of a field name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performing-a-lookup-using-a-string-literal-instead-of-a-field/m-p/532870#M150537</link>
      <description>&lt;P&gt;I've never seen that usage so you could be trying something that is not supported.&amp;nbsp; Have you tried assigning the literal to a field before the lookup?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| eval KA="Kitchen Appliance"
| lookup products.csv ProductDescription as description, ProductFunction as KA OUTPUTNEW Name as ProductName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 20:11:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performing-a-lookup-using-a-string-literal-instead-of-a-field/m-p/532870#M150537</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-11T20:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Performing a lookup using a string literal instead of a field name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performing-a-lookup-using-a-string-literal-instead-of-a-field/m-p/532875#M150538</link>
      <description>&lt;P&gt;Yep, assigning the literal value with an eval beforehand definitely works, and that's how I have it currently running, but I was hoping I could avoid that step. The docs only refer to a field value being used in the command and not a string, so I agree, it may be unsupported.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 21:52:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performing-a-lookup-using-a-string-literal-instead-of-a-field/m-p/532875#M150538</guid>
      <dc:creator>AlexBryant</dc:creator>
      <dc:date>2020-12-11T21:52:50Z</dc:date>
    </item>
  </channel>
</rss>

