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!

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...