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!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...