<?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 Set token in the value of another token? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187678#M37479</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm looking for a possibility to use one token $token2$ as part of the value of another token.&lt;BR /&gt;
For example you have a dropdown input that is $token1$ and you want to set $token2$ as part of the value of one choice like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;input type="dropdown" token="token1" searchWhenChanged="false"&amp;gt;
  &amp;lt;label&amp;gt; any &amp;lt;/label&amp;gt;
  &amp;lt;choice&amp;gt; value="field = $token2$"&amp;gt;Test&amp;lt;/choice&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I now use $token1$ in my search string I just get the string "$token2$" and not the value of $token2$. Is there a possibility to get the value of $token2$ in the value of $token1$ in simple xml without using macros??&lt;BR /&gt;
Thanks for help&lt;BR /&gt;
Greetings&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2014 07:13:03 GMT</pubDate>
    <dc:creator>C_Sparn</dc:creator>
    <dc:date>2014-06-04T07:13:03Z</dc:date>
    <item>
      <title>Set token in the value of another token?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187678#M37479</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm looking for a possibility to use one token $token2$ as part of the value of another token.&lt;BR /&gt;
For example you have a dropdown input that is $token1$ and you want to set $token2$ as part of the value of one choice like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;input type="dropdown" token="token1" searchWhenChanged="false"&amp;gt;
  &amp;lt;label&amp;gt; any &amp;lt;/label&amp;gt;
  &amp;lt;choice&amp;gt; value="field = $token2$"&amp;gt;Test&amp;lt;/choice&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I now use $token1$ in my search string I just get the string "$token2$" and not the value of $token2$. Is there a possibility to get the value of $token2$ in the value of $token1$ in simple xml without using macros??&lt;BR /&gt;
Thanks for help&lt;BR /&gt;
Greetings&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2014 07:13:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187678#M37479</guid>
      <dc:creator>C_Sparn</dc:creator>
      <dc:date>2014-06-04T07:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set token in the value of another token?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187679#M37480</link>
      <description>&lt;P&gt;Try this sample (splunk 6 simple xml)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;OneTokenAsValueForAnotherToken&amp;lt;/label&amp;gt;
  &amp;lt;fieldset&amp;gt;
    &amp;lt;input type="dropdown" token="token2" searchWhenChanged="false"&amp;gt;
      &amp;lt;label&amp;gt; any &amp;lt;/label&amp;gt;
      &amp;lt;choice value="splunkd"&amp;gt;splunkd&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="token1" searchWhenChanged="false"&amp;gt;
      &amp;lt;populatingSearch fieldForValue="Test" fieldForLabel="Test"&amp;gt;
        &amp;lt;![CDATA[|stats count | eval Test="sourcetype=$token2$" ]]&amp;gt;
      &amp;lt;/populatingSearch&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;table&amp;gt;
      &amp;lt;searchString&amp;gt;index=_internal $token1$| stats count by sourcetype&amp;lt;/searchString&amp;gt;
      &amp;lt;earliestTime&amp;gt;-60m@m&amp;lt;/earliestTime&amp;gt;
      &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
    &amp;lt;/table&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Jun 2014 13:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187679#M37480</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-04T13:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set token in the value of another token?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187680#M37481</link>
      <description>&lt;P&gt;you are a freaking genius!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 19:16:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187680#M37481</guid>
      <dc:creator>bnorthway</dc:creator>
      <dc:date>2015-12-11T19:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set token in the value of another token?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187681#M37482</link>
      <description>&lt;P&gt;do you know how to re-run the search for token1 when the value for token2 changes?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 19:52:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187681#M37482</guid>
      <dc:creator>bnorthway</dc:creator>
      <dc:date>2015-12-11T19:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set token in the value of another token?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187682#M37483</link>
      <description>&lt;P&gt;change value of searchWhenChanged to true. This will re-run search when value changes.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 16:58:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Set-token-in-the-value-of-another-token/m-p/187682#M37483</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2016-02-17T16:58:01Z</dc:date>
    </item>
  </channel>
</rss>

