Dashboards & Visualizations

How to have multiple values in a token

bryceweb22
Path Finder

I am looking for a way to have my token in a multiselect dropdown pass two values into the search to increase the chances of generating more accurate results, please help.

Thanks!

0 Karma

vnravikumar
Champion

Hi

Check this sample

<form>
  <label>multiselect</label>
  <fieldset submitButton="false">
    <input type="multiselect" token="field1">
      <label>field1</label>
      <valuePrefix>method="</valuePrefix>
      <delimiter> OR </delimiter>
      <valueSuffix>"</valueSuffix>
      <fieldForLabel>method</fieldForLabel>
      <fieldForValue>method</fieldForValue>
      <search>
        <query>index="_internal" sourcetype=splunkd_ui_access |stats count by method</query>
      </search>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>index="_internal" $field1$</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</form>
0 Karma

bryceweb22
Path Finder

Okay so I added the OR in the delimiter but where do I add my second value at because I tried doing it after the first one and no results were found.

0 Karma

vnravikumar
Champion

You need to consider these

 <valuePrefix>method="</valuePrefix>
       <delimiter> OR </delimiter>
       <valueSuffix>"</valueSuffix>

Finally, it constructed as index="_internal" method="DELETE" OR method="HEAD"

0 Karma

bryceweb22
Path Finder

Okay well I need it to be like this example

ModuleId=490 OR LevelId=70

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...