Dashboards & Visualizations

How to use choice values with token?

felipesewaybric
Contributor
  <input type="multiselect" token="reason_token" searchWhenChanged="true">
    <label>Filtro de Causas</label>
    <search>
      <query>| dbquery DB01 "select 
      idt_deduction as \"reason\",
      des_deduction as \"desc\"
      from deduction
      where idt_deduction_group='$group_token$'"
      | eval teste = $group_token$
      | stats values(reason) as reason by desc 
      | eval Reason = reason + " - " + desc</query>
    </search>
    <fieldForLabel>Reason</fieldForLabel>
    <fieldForValue>reason</fieldForValue>
    <delimiter> , </delimiter>
    <choice value="select 
      idt_deduction_reason
      from deduction_reason 
      where idt_deduction_reason_group='$group_token$'">All
    </choice>
  </input>
Tags (3)
0 Karma

FritzWittwer_ol
Contributor

I usual use something in the form of..

<input type="multiselect" token="reason_token" searchWhenChanged="true">
  <label>Filtro de Causas</label>
  <populatingSearch fieldForLabel="Reason" fieldForValue="reason">
    | dbquery DB01 .....
  </populatingSearch>
  <delimiter> , </delimiter>
</input>
0 Karma

woodcock
Esteemed Legend

Your $group_token$ is not being set anywhere so it can never work. How are you planning to set it?

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 ...