<?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: multiselect and foreach in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/multiselect-and-foreach/m-p/380546#M24887</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
That helped me get closer to what i need ! &lt;BR /&gt;
Can you help me with the other part of my question ? &lt;/P&gt;

&lt;P&gt;I am trying to add the content of the lookup without the values of the drilldown. &lt;BR /&gt;
The subsearch i add doesn't seem to work : &lt;/P&gt;

&lt;P&gt;| search &lt;BR /&gt;
  [| inputlookup lookup.csv&lt;BR /&gt;
    | where Column2!= "$drilldown$"&lt;BR /&gt;
    | table Column1 Column2]&lt;/P&gt;

&lt;P&gt;I really appreciate your help !  &lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2019 08:02:36 GMT</pubDate>
    <dc:creator>astatrial</dc:creator>
    <dc:date>2019-03-28T08:02:36Z</dc:date>
    <item>
      <title>multiselect and foreach</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/multiselect-and-foreach/m-p/380544#M24885</link>
      <description>&lt;P&gt;Hello ! &lt;BR /&gt;
I have  a dashboard with two inputs fields, one drilldown and the other is multiselect. &lt;BR /&gt;
I am trying to get values from multiselect input and run a search on them. &lt;/P&gt;

&lt;P&gt;The search will take every value from the multiselect and will insert, to an existing lookup, a row with the value and the drilldown token's value.&lt;/P&gt;

&lt;P&gt;For example: &lt;BR /&gt;
Multi select Token = Field1, Field2, Field3 &lt;BR /&gt;
drilldown Token = old&lt;BR /&gt;
After clicking submit this will be the lookup: &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6787i12C28919D118B741/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Those rows should replace every other row which existed in the lookup before and had the drilldown value.&lt;/P&gt;

&lt;P&gt;I managed to do it for a single valued token but not for multiselect token: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval Column1="$single$" , Column2="$drilldown$" 
| table Column1 Column2
| inputlookup append=t Lookup.csv
| where Column2!= "$drilldown$" OR (Column1= "$single$" AND Column2= "$drilldown$")
| outputlookup  Lookup.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried to use foreach but it doesn't really work. &lt;/P&gt;

&lt;P&gt;Can someone help me with that? &lt;/P&gt;

&lt;P&gt;Thanks ! &lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 15:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/multiselect-and-foreach/m-p/380544#M24885</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-03-26T15:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: multiselect and foreach</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/multiselect-and-foreach/m-p/380545#M24886</link>
      <description>&lt;P&gt;It'll depend upon how the values are formatted in your multiselect. Assuming you're creating a comma separated list of values (e.g. "Value1, Value2, Value3" ) then try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
 | eval Column1="$single$" , Column2="$drilldown$" 
 | table Column1 Column2
 | makemv Column1 delim="," | mvexpand Column1
 | outputlookup  Lookup.csv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Mar 2019 15:43:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/multiselect-and-foreach/m-p/380545#M24886</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-26T15:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: multiselect and foreach</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/multiselect-and-foreach/m-p/380546#M24887</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
That helped me get closer to what i need ! &lt;BR /&gt;
Can you help me with the other part of my question ? &lt;/P&gt;

&lt;P&gt;I am trying to add the content of the lookup without the values of the drilldown. &lt;BR /&gt;
The subsearch i add doesn't seem to work : &lt;/P&gt;

&lt;P&gt;| search &lt;BR /&gt;
  [| inputlookup lookup.csv&lt;BR /&gt;
    | where Column2!= "$drilldown$"&lt;BR /&gt;
    | table Column1 Column2]&lt;/P&gt;

&lt;P&gt;I really appreciate your help !  &lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 08:02:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/multiselect-and-foreach/m-p/380546#M24887</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-03-28T08:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: multiselect and foreach</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/multiselect-and-foreach/m-p/380547#M24888</link>
      <description>&lt;P&gt;Never mind i got it&lt;BR /&gt;
I used the command append instead of the search. &lt;/P&gt;

&lt;P&gt;Thanks a lot !!!!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 08:09:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/multiselect-and-foreach/m-p/380547#M24888</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-03-28T08:09:15Z</dc:date>
    </item>
  </channel>
</rss>

