Dashboards & Visualizations

Is there way to refresh a Simple XML drop-down?

lyndac
Contributor

I have two drop-downs on my simple XML dashboard. Both are populated by searches and the second one is dependent on the selection from the first (source below). It works great for populating the drop-downs initially, and if I change the selection in the first drop-down, the list of choices in the second drop-down is regenerated appropriately. This issue is that the "selection" on the second drop-down still shows as the item selected from the initial list. That item is NOT in the newly generated choices.

For example, the initial drop-downs are: sys: {sysa, sysb, sysc}, sysa is selected (first in the list) . The second drop-down is fp: {fp1, fp2, fp3}, with fp1 selected. Now I choose sysb from the first drop-down. The new list for the second drop-down is fp: {fp7, fp9, fp21, fp34}. But the selection still remains fp1. I'd like for the selection of the second drop-down to be the first item in the list (fp7) (or at least it should not show anything selected). How can I do this?

    <form>
      <fieldset submitButton="false" autoRun="true">
        <input type="dropdown" token="sys_tok" searchWhenChanged="true">
            <search>
               <query> index=foo | stats count by sys</query>
             </search>
            <selectFirstChoice>true</selectFirstChoice>
            <fieldForLabel>sys</fieldForLabel>
            <fieldForValue>sys</fieldForValue>
         </input>
       <input type="dropdown" token="fp_tok" searchWhenChanged="true">
            <search>
               <query> index=foo  sys=$sys_tok$| stats count by fp</query>
             </search>
            <selectFirstChoice>true</selectFirstChoice>
            <fieldForLabel>fp</fieldForLabel>
            <fieldForValue>fp</fieldForValue>
         </input>
0 Karma

venky1544
Builder

Hi @lyndac i know its a very old question but did you found an answer for it 

0 Karma

asimagu
Builder
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...