<?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 populate a radio button input with the unique values of a field? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110199#M23140</link>
    <description>&lt;P&gt;the search is what does the filling. calling it elementType doesn't do anything but self annotate the code. I could have called it "mytoken" and used that populating search and it would still work... because the &lt;BR /&gt;
       &lt;FIELDFORVALUE&gt;elementType&lt;/FIELDFORVALUE&gt;  tells it which value from the populating search it should use to stuff the token...  (the values for the elementType field...)&lt;/P&gt;

&lt;P&gt;Try it.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Mar 2015 01:50:04 GMT</pubDate>
    <dc:creator>rsennett_splunk</dc:creator>
    <dc:date>2015-03-30T01:50:04Z</dc:date>
    <item>
      <title>How to populate a radio button input with the unique values of a field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110196#M23137</link>
      <description>&lt;P&gt;I have the following &lt;CODE&gt;radio button input&lt;/CODE&gt; that I would like to populate with the unique values of &lt;CODE&gt;elementType&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;input type="radio" token="elementType"&amp;gt;
        &amp;lt;label&amp;gt;Element Types&amp;lt;/label&amp;gt;
        &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
        &amp;lt;populatingSearch fieldForValue="elementType" fieldForLabel="elementType"&amp;gt;
          &amp;lt;![CDATA[index=core host="snzclakl598" | head 1000 | top elementType ]]&amp;gt;
        &amp;lt;/populatingSearch&amp;gt;
        &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do I need to use the token &lt;CODE&gt;elementType&lt;/CODE&gt; further down in a search in a panel for the &lt;CODE&gt;radio button input&lt;/CODE&gt; to work? &lt;BR /&gt;
How do I set my to search for &lt;CODE&gt;randomText*&lt;/CODE&gt; criteria? is this done in the &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;* in the search in&lt;/LI&gt;
&lt;LI&gt;the &lt;CODE&gt;radio button input&lt;/CODE&gt; in the&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;search in the &lt;CODE&gt;search string in the panel&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;SEARCHSTRING&gt;... elementType=$elementType$  ... | timechart  span=$timespan$ max(c100991388) by measObjLdn  | eval  threshold=80&lt;/SEARCHSTRING&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 27 Mar 2015 00:33:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110196#M23137</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-03-27T00:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate a radio button input with the unique values of a field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110197#M23138</link>
      <description>&lt;P&gt;You want something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="radio" token="elementType" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Element Types&amp;lt;/label&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index=core host="snzclakl598" | head 1000 | top elementType&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;elementType&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;elementType&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;prefix&amp;gt;elementType="&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;"&amp;lt;/suffix&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Because I've used the prefix and suffix tags the search would be something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... $elementType$  ... | timechart  span=$timespan$ max(c100991388) by measObjLdn  | eval  threshold=80
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which would then translate to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... elementType=value_from_radio_button  ... | timechart  span=$timespan$ max(c100991388) by measObjLdn  | eval  threshold=80
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Mar 2015 08:40:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110197#M23138</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2015-03-27T08:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate a radio button input with the unique values of a field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110198#M23139</link>
      <description>&lt;P&gt;does &lt;CODE&gt;token="elementType"&lt;/CODE&gt; map to this &lt;CODE&gt;$elementType$&lt;/CODE&gt; in the search. then why have a sepereate search in the radio button ``&lt;/P&gt;

&lt;P&gt;What I want to do is fill the radio button with all the values of &lt;CODE&gt;elementType&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2015 21:39:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110198#M23139</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-03-29T21:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate a radio button input with the unique values of a field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110199#M23140</link>
      <description>&lt;P&gt;the search is what does the filling. calling it elementType doesn't do anything but self annotate the code. I could have called it "mytoken" and used that populating search and it would still work... because the &lt;BR /&gt;
       &lt;FIELDFORVALUE&gt;elementType&lt;/FIELDFORVALUE&gt;  tells it which value from the populating search it should use to stuff the token...  (the values for the elementType field...)&lt;/P&gt;

&lt;P&gt;Try it.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 01:50:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110199#M23140</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2015-03-30T01:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate a radio button input with the unique values of a field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110200#M23141</link>
      <description>&lt;P&gt;Hi  HattrickNZ &lt;BR /&gt;
Try this xml code &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
&amp;lt;label&amp;gt;Form Input Example (Time)&amp;lt;/label&amp;gt;
&amp;lt;description/&amp;gt;
     &amp;lt;input type="radio"  token="elementType"&amp;gt;
    &amp;lt;label&amp;gt;Element Types&amp;lt;/label&amp;gt;
    &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
    &amp;lt;populatingSearch fieldForValue="elementType" fieldForLabel="elementType"&amp;gt;
    &amp;lt;![CDATA[index=core host="snzclakl598" | head 1000 | top elementType ]]&amp;gt;
    &amp;lt;/populatingSearch&amp;gt;
    &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;

&amp;lt;input type="time"  token="timespan" searchWhenChanged="true"&amp;gt;
&amp;lt;label&amp;gt;Select time range&amp;lt;/label&amp;gt;
&amp;lt;default&amp;gt;
&amp;lt;earliestTime&amp;gt;-7d@h&amp;lt;/earliestTime&amp;gt;
&amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
&amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;/fieldset&amp;gt;

&amp;lt;row&amp;gt;
&amp;lt;panel&amp;gt;
&amp;lt;chart&amp;gt;
&amp;lt;title&amp;gt; &amp;lt;/title&amp;gt;
 &amp;lt;searchString&amp;gt;
index=core host="snzclakl598" elementType=$elementType$  ...... | timechart  span=$timespan$  max(c100991388) by measObjLdn  | eval  threshold=80
 &amp;lt;/searchString&amp;gt;
&amp;lt;earliestTime&amp;gt;$timespan.earliest$&amp;lt;/earliestTime&amp;gt;
&amp;lt;latestTime&amp;gt;$timespan.latest$&amp;lt;/latestTime&amp;gt;
&amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
&amp;lt;/chart&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Mar 2015 09:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-populate-a-radio-button-input-with-the-unique-values-of-a/m-p/110200#M23141</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-03-30T09:08:50Z</dc:date>
    </item>
  </channel>
</rss>

