Getting Data In

clear multisect input on dropdown change

ips_mandar
Builder

Hi,
I have two inputs in my dashboards- one is dropdown and second is multiselect input. I want to clear multiselect input valuesevery time I change first dropdown inputs.
Please help with sample xml.
Thanks,

0 Karma
1 Solution

vnravikumar
Champion

Hi

Check this

<form>
  <fieldset submitButton="false">
    <input type="dropdown" token="color" id="dp">
      <label>field1</label>
      <choice value="red">red</choice>
      <choice value="orange">orange</choice>
      <choice value="green">green</choice>
      <change>
        <condition>
          <unset token="form.number"></unset>
        </condition>
      </change>
    </input>
    <input type="multiselect" token="number">
      <label>field1</label>
      <choice value="one">one</choice>
      <choice value="two">two</choice>
    </input>
  </fieldset>
</form>

View solution in original post

0 Karma

patelmc
Explorer

Hi,

I am trying this for single value select drop down but I see the value but not able to select.
Do I need some other settings for singe value drop-down?

<input type="dropdown" token="NODE_NAME" searchWhenChanged="false">
  <label>Node Name</label>
  <fieldForLabel>Node_Name</fieldForLabel>
  <fieldForValue>Node_Name</fieldForValue>
         <change>
     <condition>
       <unset token="form.IF_NAME"></unset>
     </condition>
   </change>
  <search>
    <query>| mcatalog values(Node_Name) as Node_Name WHERE index="interface_metrics_data" | mvexpand  Node_Name </query>
  </search>
</input>
<input type="dropdown" token="IF_NAME" searchWhenChanged="false">
  <label>Interface</label>
  <fieldForLabel>IfName</fieldForLabel>
  <fieldForValue>IfName</fieldForValue>
  <search>
    <query>| mcatalog values(IfName) as IfName values(IfSpeed) as IfSpeed values(IfAlias) as IfAlias WHERE index="interface_metrics_data" Node_Name="$NODE_NAME$"| mvexpand IfName </query>
  </search>
</input>
0 Karma

vnravikumar
Champion

Hi

Check this

<form>
  <fieldset submitButton="false">
    <input type="dropdown" token="color" id="dp">
      <label>field1</label>
      <choice value="red">red</choice>
      <choice value="orange">orange</choice>
      <choice value="green">green</choice>
      <change>
        <condition>
          <unset token="form.number"></unset>
        </condition>
      </change>
    </input>
    <input type="multiselect" token="number">
      <label>field1</label>
      <choice value="one">one</choice>
      <choice value="two">two</choice>
    </input>
  </fieldset>
</form>
0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...