<?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 use field name as the value passed into a lookup table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-field-name-as-the-value-passed-into-a-lookup-table/m-p/210661#M61583</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;| foreach p* [eval val='&amp;lt;&amp;gt;' | lookup wkst_risk_control asset_risk_position AS 'val']
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have 19 separate p extraction fields called &lt;STRONG&gt;p0-p18&lt;/STRONG&gt;. I am looking to loop through each of the field names called &lt;STRONG&gt;p&lt;/STRONG&gt;* and do a lookup of the name of the field itself from the lookup table wkst_risk_control to get the supplemental data.   I am struggling and missing something.  Is &lt;CODE&gt;foreach&lt;/CODE&gt; the best way or is there a more elegant method?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:40:55 GMT</pubDate>
    <dc:creator>TobiasBoone</dc:creator>
    <dc:date>2020-09-29T11:40:55Z</dc:date>
    <item>
      <title>How to use field name as the value passed into a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-field-name-as-the-value-passed-into-a-lookup-table/m-p/210661#M61583</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| foreach p* [eval val='&amp;lt;&amp;gt;' | lookup wkst_risk_control asset_risk_position AS 'val']
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have 19 separate p extraction fields called &lt;STRONG&gt;p0-p18&lt;/STRONG&gt;. I am looking to loop through each of the field names called &lt;STRONG&gt;p&lt;/STRONG&gt;* and do a lookup of the name of the field itself from the lookup table wkst_risk_control to get the supplemental data.   I am struggling and missing something.  Is &lt;CODE&gt;foreach&lt;/CODE&gt; the best way or is there a more elegant method?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-field-name-as-the-value-passed-into-a-lookup-table/m-p/210661#M61583</guid>
      <dc:creator>TobiasBoone</dc:creator>
      <dc:date>2020-09-29T11:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use field name as the value passed into a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-field-name-as-the-value-passed-into-a-lookup-table/m-p/210662#M61584</link>
      <description>&lt;P&gt;Something like this should work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| foreach p* [ lookup wkst_risk_control asset_risk_position AS "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2016 21:36:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-field-name-as-the-value-passed-into-a-lookup-table/m-p/210662#M61584</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-11-04T21:36:34Z</dc:date>
    </item>
  </channel>
</rss>

