Getting Data In

clear multisect input on dropdown change

Contributor

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

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

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

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
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!