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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...