Dashboards & Visualizations

Why does the Dynamic content Drop-Down auto clears unexpectedly?

altink
Builder

Dear All

I have a problem with a "slave" Drop-Down (field-scan_run_id) whose option values are set dynamically according to value chosen in another "master" Drop-Down (field_db_name).
The "slave" drop down auto-clears after I choose a value on it - practically I cannot set anything on it!

The code is below:

<form>
  <label>Scan Compare 002</label>
  <fieldset submitButton="false" autoRun="false">
    <input type="time" token="field1">
      <label>Time</label>
      <default>
        <earliest>-30d@d</earliest>
        <latest>now</latest>
      </default>
    </input>
    <input type="dropdown" token="field_db_name" searchWhenChanged="true">
      <label>Database</label>
      <fieldForLabel>DB_NAME</fieldForLabel>
      <fieldForValue>DB_NAME</fieldForValue>
      <search>
        <query>index=omega_ds | DEDUP DB_NAME | FIELDS DB_NAME</query>
        <earliest>$field1.earliest$</earliest>
        <latest>$field1.latest$</latest>
      </search>
      <change>
         <unset token="form.field_scan_run_id"></unset>
      </change>
      <selectFirstChoice>true</selectFirstChoice>
      <prefix>"</prefix>
      <suffix>"</suffix>
    </input>
    <input type="dropdown" token="field_scan_run_id" searchWhenChanged="true">
      <label>Scan Id Run</label>
      <search>
        <query>index=omega_ds  
DB_NAME=$field_db_name$
| stats 
earliest(_time) as SCAN_DT_START
by DB_NAME SCAN_ID
| sort - SCAN_DT_START</query>
        <earliest>$field1.earliest$</earliest>
        <latest>$field1.latest$</latest>
      </search>
      <fieldForLabel>SCAN_ID</fieldForLabel>
      <fieldForValue>SCAN_ID</fieldForValue>
      <prefix>"</prefix>
      <suffix>"</suffix>
    </input>
  </fieldset>
</form>

I noticed that if I remove the

 <change>
             <unset token="form.field_scan_run_id"></unset>
          </change>

at "master" input field_db_name - the problem goes.

But I need to clear the existing value of the "slave" value since it will keep the old value which will be sure NOT be present in the new range of options changed by the chosen value in "master".

can someone please advise?

best regards
Altin

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Splunk App Dev Quarterly Roundup: AI, Agents, and Innovation!

Another quarter, another wave of innovation. From complex integrations to pushing the limits ...

Federated Search for Dynamic Data Self Storage Is Now Generally Available on Splunk ...

 Splunk is excited to announce the General Availability of Federated Search for Dynamic Data Self Storage ...

Index This | What has many keys but can’t unlock a door?

July 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...