hi guys
This is what I need to sort out:
I have 2 dropdowns in my dashboard.
Dropdown 1 shows a list of Teams and dropdown 2 shows a list of Team members
The usual process is to select a Team in dropdown 1, and then dropdown 2 will only show the Team Members of that Team. However, if you don't select anything on dropdown 1, dropdown 2 will show all the team members of all teams.
I would like these dropdowns to work like this too:
If the users selects first the Team member in dropdown2 , dropdown 1 will automatically show the Team Name of that user.
does that make sense? how can I make this possible? any ideas?
thanks in advance
Hi asimagu!
Try like this:
<form>
<label>ropdown</label>
<fieldset submitButton="false">
<input type="dropdown" token="sourcetype" searchWhenChanged="true">
<label>drop1</label>
<search>
<query>index=_internal $method$|stats count by sourcetype</query>
</search>
<fieldForLabel>sourcetype</fieldForLabel>
<fieldForValue>sourcetype</fieldForValue>
<prefix>sourcetype="</prefix>
<suffix>"</suffix>
<choice value="*">All</choice>
</input>
<input type="dropdown" token="method" searchWhenChanged="true">
<label>drop2</label>
<search>
<query>index=_internal |stats count by method</query>
<earliest>0</earliest>
<latest></latest>
</search>
<fieldForLabel>method</fieldForLabel>
<fieldForValue>method</fieldForValue>
<prefix>method="</prefix>
<suffix>"</suffix>
</input>
</fieldset>
<row>
<panel>
<table>
<search>
<query>index=_internal $sourcetype$ $method$ | stats count by sourcetype , method</query>
<earliest>0</earliest>
<latest></latest>
</search>
<option name="wrap">true</option>
<option name="rowNumbers">false</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">cell</option>
<option name="count">10</option>
</table>
</panel>
</row>
</form>
This is not what I needed, sorry. In your example there is only one dependency.
you use Dropdown 2 first and then Dropdown 1 gets populated.
I want to do this:
Select something from Dropdown1 and then dropdown2 changes the available options.
Then start again, refresh the dashboard and now do this:
Select something from Dropdown2 and then dropdown1 changes the selected option (or default option).
Let's say Dropdown 1 has this: All teams, Team A, Team B
and dropdown 2 has these: Pete (Team A), John (Team A), Douglas (Team B)
If the user selects the team first, the second dropdown shows only the users of that team, but it the user selects the user first, then dropdown1 will automatically show as selected the team the user belongs too
OK! i am trying...