<?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 assign value for muliselect option with another token? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303319#M164846</link>
    <description>&lt;P&gt;@niketnilay $tokenhost$ -&amp;gt; host="pft-web-1" OR  host="pft-web-2" &lt;BR /&gt;
The tokenhost is based on the multiselected options. It can either be one server or 2 server or it can be All too.&lt;/P&gt;

&lt;P&gt;$hosttype$ is passed from another dashboard. This dashboard is drilldown of another. Version of splunk - 6.4.1&lt;/P&gt;</description>
    <pubDate>Mon, 27 Nov 2017 04:30:48 GMT</pubDate>
    <dc:creator>sangs8788</dc:creator>
    <dc:date>2017-11-27T04:30:48Z</dc:date>
    <item>
      <title>How to assign value for muliselect option with another token?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303315#M164842</link>
      <description>&lt;P&gt;Hi , I have a token $hosstype$ which will get values as 'web', 'rpt' etc. If All option is selected the value to be passed to $tokenhost$ should be "prod-$hosttype*". How do i assign value as concatenated string with another token ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;label&amp;gt;$server$&amp;lt;/label&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;index=app   sourcetype=app_gc_log  host="prod-$hosttype$*"| dedup host |sort host | table host&amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;-30d@d&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
  &amp;lt;/search&amp;gt;
   &amp;lt;choice value="prod-$hosttype$*"&amp;gt;All&amp;lt;/choice&amp;gt;        
  &amp;lt;fieldForLabel&amp;gt;host&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;host&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;valuePrefix&amp;gt;host=&amp;lt;/valuePrefix&amp;gt;
  &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Nov 2017 14:01:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303315#M164842</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2017-11-24T14:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value for muliselect option with another token?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303316#M164843</link>
      <description>&lt;P&gt;Try something like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;label&amp;gt;$server$&amp;lt;/label&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;index=app   sourcetype=app_gc_log  host="prod-$hosttype$*"
      | dedup host 
      | sort 0 host  
      | eval hostvalue=host 
      | append [
        | makeresults 
        | eval host="All", hostvalue="prod-$hosttype$*"
        ]
      | table host hostvalue 
      &amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;-30d@d&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;fieldForLabel&amp;gt;host&amp;lt;/fieldForLabel&amp;gt;
    &amp;lt;fieldForValue&amp;gt;hostvalue&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;valuePrefix&amp;gt;host="&amp;lt;/valuePrefix&amp;gt;
    &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;Technically, since it isn't a multiselect, you wouldn't need the delimiter.  If you ever turn it into a multiselect, then you will need these:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;prefix&amp;gt; ( &amp;lt;/prefix&amp;gt;
    &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
    &amp;lt;suffix&amp;gt; ) &amp;lt;/suffix&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Nov 2017 15:14:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303316#M164843</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-11-24T15:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value for muliselect option with another token?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303317#M164844</link>
      <description>&lt;P&gt;No luck. The input lists down the server name except for the "All" option&lt;/P&gt;</description>
      <pubDate>Sat, 25 Nov 2017 11:28:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303317#M164844</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2017-11-25T11:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value for muliselect option with another token?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303318#M164845</link>
      <description>&lt;P&gt;@sangs8788 can you step back a little and post the input example and output example?&lt;BR /&gt;
Is it that hosttype contains a comma separated value and you need to prefix and suffix the entire content?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$hosttype$ -&amp;gt;  'web', 'rpt', 'blah'
$tokenhost$ -&amp;gt; ????
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where is the code which sets up $hosttype$?&lt;BR /&gt;
Also which version of Splunk are you using &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Nov 2017 15:36:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303318#M164845</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-25T15:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value for muliselect option with another token?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303319#M164846</link>
      <description>&lt;P&gt;@niketnilay $tokenhost$ -&amp;gt; host="pft-web-1" OR  host="pft-web-2" &lt;BR /&gt;
The tokenhost is based on the multiselected options. It can either be one server or 2 server or it can be All too.&lt;/P&gt;

&lt;P&gt;$hosttype$ is passed from another dashboard. This dashboard is drilldown of another. Version of splunk - 6.4.1&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 04:30:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303319#M164846</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2017-11-27T04:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value for muliselect option with another token?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303320#M164847</link>
      <description>&lt;P&gt;@sangs8788, I think you need to prefix all host values passed from source-dashboard with &lt;CODE&gt;pft-&lt;/CODE&gt;. You can do this directly from Source Dashboard by also passing comma delimited values for $form.tokenhost$ for the multiselect. If this seems feasible, I can post a dummy source-destination drilldown to set token for multiselect input.&lt;/P&gt;

&lt;P&gt;Meanwhile you can refer to one of my Splunk Wiki Talk topic on setting token for multi-select using text box. In your case the values will be set by source dashboard itself rather than the text-box.&lt;/P&gt;

&lt;P&gt;** &lt;A href="https://wiki.splunk.com/User_talk:Niketnilay#Topic_13:_Use_text_box_as_multi-value_input_for_Multiselect_input_using_SimpleXML"&gt;https://wiki.splunk.com/User_talk:Niketnilay#Topic_13:_Use_text_box_as_multi-value_input_for_Multiselect_input_using_SimpleXML&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 06:01:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-assign-value-for-muliselect-option-with-another-token/m-p/303320#M164847</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-27T06:01:57Z</dc:date>
    </item>
  </channel>
</rss>

