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>

View solution in original post

0 Karma
Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.