<?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 store multiple values in one token and pass into another search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-store-multiple-values-in-one-token-and-pass-into-another/m-p/656937#M226904</link>
    <description>&lt;P&gt;I have "Product Brand" multiselect filter in a Splunk dashboard. It is a dynamic filter rather than static. I also have a panel displaying all product brands. Now, I want another conditional panel to display further information of 3 of the brands in the product brand list if user selects any of these 3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I have to set a &lt;FONT face="andale mono,times" size="4"&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="andale mono,times" size="4"&gt;change&amp;gt;&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;and &lt;FONT face="andale mono,times"&gt;&amp;lt;condition&amp;gt;&lt;/FONT&gt; tag in XML to toggle between the display of panel and store the selected values. I now write three condition tags with set token like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;      &amp;lt;change&amp;gt;
        &amp;lt;condition match="A"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="B"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="C"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition&amp;gt;
          &amp;lt;unset token="show_product_panel"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;unset token="show_product"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I want the $show_product$ to hold multiple values instead of one, as it is a multiselect filter. How should I do so? I have tried something in each of the condition like but won't work. How can I "append" the values into $show_product$? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;eval token="show_product"&amp;gt;if(isnull($show_product$), $value$, $show_product$.", ".$value$)&amp;lt;/eval&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI: the $show_product$ will be passed into the conditional panel like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;row depends="$show_product_panel$"&amp;gt;
    &amp;lt;panel&amp;gt;
        &amp;lt;chart&amp;gt;
            &amp;lt;search&amp;gt;
                &amp;lt;query&amp;gt;index IN ("A_a", "A_b")
                    | where match(index, "A_" + $subsidiary$)
                    | dedup id sortby _time
                    | eval "Product Brand" = coalesce('someFieldA',
                    'someFieldB')
                    | search "Product Brand" IN ($show_product$)
                    | timechart span=1mon count by "Product Brand"&amp;lt;/query&amp;gt;
                &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
                &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
            &amp;lt;/search&amp;gt;
            &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
            &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI: Product Brand XML code snippet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="multiselect" token="product_brand" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Product Brand&amp;lt;/label&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;brand_combine&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;brand_combine&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index IN ("A","B")
| eval brand_combine = coalesce('someFieldA','someFieldB')
| search brand_combine != null
| where match(index, "zendesk_ticket_"  + $subsidiary$) 
| dedup brand_combine
| fields brand_combine&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;
      &amp;lt;delimiter&amp;gt;,&amp;lt;/delimiter&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition match="A"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="B"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="C"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition&amp;gt;
          &amp;lt;unset token="show_product_panel"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;unset token="show_product"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2023 09:00:48 GMT</pubDate>
    <dc:creator>itnewbie</dc:creator>
    <dc:date>2023-09-07T09:00:48Z</dc:date>
    <item>
      <title>How to store multiple values in one token and pass into another search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-store-multiple-values-in-one-token-and-pass-into-another/m-p/656937#M226904</link>
      <description>&lt;P&gt;I have "Product Brand" multiselect filter in a Splunk dashboard. It is a dynamic filter rather than static. I also have a panel displaying all product brands. Now, I want another conditional panel to display further information of 3 of the brands in the product brand list if user selects any of these 3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I have to set a &lt;FONT face="andale mono,times" size="4"&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="andale mono,times" size="4"&gt;change&amp;gt;&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;and &lt;FONT face="andale mono,times"&gt;&amp;lt;condition&amp;gt;&lt;/FONT&gt; tag in XML to toggle between the display of panel and store the selected values. I now write three condition tags with set token like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;      &amp;lt;change&amp;gt;
        &amp;lt;condition match="A"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="B"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="C"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition&amp;gt;
          &amp;lt;unset token="show_product_panel"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;unset token="show_product"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I want the $show_product$ to hold multiple values instead of one, as it is a multiselect filter. How should I do so? I have tried something in each of the condition like but won't work. How can I "append" the values into $show_product$? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;eval token="show_product"&amp;gt;if(isnull($show_product$), $value$, $show_product$.", ".$value$)&amp;lt;/eval&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI: the $show_product$ will be passed into the conditional panel like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;row depends="$show_product_panel$"&amp;gt;
    &amp;lt;panel&amp;gt;
        &amp;lt;chart&amp;gt;
            &amp;lt;search&amp;gt;
                &amp;lt;query&amp;gt;index IN ("A_a", "A_b")
                    | where match(index, "A_" + $subsidiary$)
                    | dedup id sortby _time
                    | eval "Product Brand" = coalesce('someFieldA',
                    'someFieldB')
                    | search "Product Brand" IN ($show_product$)
                    | timechart span=1mon count by "Product Brand"&amp;lt;/query&amp;gt;
                &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
                &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
            &amp;lt;/search&amp;gt;
            &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
            &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI: Product Brand XML code snippet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="multiselect" token="product_brand" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Product Brand&amp;lt;/label&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;brand_combine&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;brand_combine&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index IN ("A","B")
| eval brand_combine = coalesce('someFieldA','someFieldB')
| search brand_combine != null
| where match(index, "zendesk_ticket_"  + $subsidiary$) 
| dedup brand_combine
| fields brand_combine&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;
      &amp;lt;delimiter&amp;gt;,&amp;lt;/delimiter&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition match="A"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="B"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="C"&amp;gt;
          &amp;lt;set token="show_product_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="show_product"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition&amp;gt;
          &amp;lt;unset token="show_product_panel"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;unset token="show_product"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 09:00:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-store-multiple-values-in-one-token-and-pass-into-another/m-p/656937#M226904</guid>
      <dc:creator>itnewbie</dc:creator>
      <dc:date>2023-09-07T09:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to store multiple values in one token and pass into another search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-store-multiple-values-in-one-token-and-pass-into-another/m-p/656944#M226908</link>
      <description>&lt;P&gt;The product_brand token already holds the chosen values.&lt;/P&gt;&lt;P&gt;You can use the prefix, suffix, valuePrefix, valueSuffix and delimiter options to determine how the token is formatted.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.1.1/Viz/PanelreferenceforSimplifiedXML#input_.28form.29" target="_blank"&gt;Simple XML Reference - Splunk Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 10:08:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-store-multiple-values-in-one-token-and-pass-into-another/m-p/656944#M226908</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-09-07T10:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to store multiple values in one token and pass into another search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-store-multiple-values-in-one-token-and-pass-into-another/m-p/657029#M226944</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Thanks for the reply. Given I use $product_brand$ in the conditional panel now, I still need to set the condition of displaying the panel. At the &amp;lt;condition&amp;gt; tag, how can I set it to accept multiple values? As the above method only accepts a single value at one time, I want it to be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if $procut_brand$ IN ANY of product brand ["A", "B", "C"], set the display panel to true&lt;/LI-CODE&gt;&lt;P&gt;and if not in those 3, just don't display. Any nudge in the right direction? Many thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 08:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-store-multiple-values-in-one-token-and-pass-into-another/m-p/657029#M226944</guid>
      <dc:creator>itnewbie</dc:creator>
      <dc:date>2023-09-08T08:39:43Z</dc:date>
    </item>
  </channel>
</rss>

