<?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: How to use a list of values from a table into foreach fieldstr? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-list-of-values-from-a-table-into-foreach-fieldstr/m-p/394155#M114523</link>
    <description>&lt;P&gt;Hi @danielearangiomazza,&lt;BR /&gt;
I don't understand your question properly, if you can give query before foreach or sample input-output so I can help you.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Sep 2018 13:52:46 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2018-09-27T13:52:46Z</dc:date>
    <item>
      <title>How to use a list of values from a table into foreach fieldstr?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-list-of-values-from-a-table-into-foreach-fieldstr/m-p/394154#M114522</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I already used the following lines with success:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| foreach fieldstr=device "device_name1" "device_name2" "device_name3" "device_nameN" 
    [ eval device= "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, is it possible to pass a list of my devices name from a lookup table? I mean, something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| foreach fieldstr=device inputlookup devices_list.csv
    [ eval device= "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With devices_list.csv as:&lt;/P&gt;

&lt;P&gt;device&lt;BR /&gt;
...&lt;BR /&gt;
device_name1&lt;BR /&gt;
device_name2&lt;BR /&gt;
device_name3&lt;BR /&gt;
device_nameN&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:23:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-list-of-values-from-a-table-into-foreach-fieldstr/m-p/394154#M114522</guid>
      <dc:creator>danielearangiom</dc:creator>
      <dc:date>2020-09-29T21:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a list of values from a table into foreach fieldstr?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-list-of-values-from-a-table-into-foreach-fieldstr/m-p/394155#M114523</link>
      <description>&lt;P&gt;Hi @danielearangiomazza,&lt;BR /&gt;
I don't understand your question properly, if you can give query before foreach or sample input-output so I can help you.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-list-of-values-from-a-table-into-foreach-fieldstr/m-p/394155#M114523</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-09-27T13:52:46Z</dc:date>
    </item>
  </channel>
</rss>

