Hi,
I would like to filter a dashboard by using a Dropdown Input at the top of my dashboard. By selecting one of the dropdown values (Total, Data A, Data B) the charts and tables should only show values of the chosen dataset. Data A and Data B can be distinguished by field12, that consists of numbers. For Data A field12 always starts with 1 or 2. For Data B field12 always starts with a 7. For Total it doesnt matter, because total should contain all data.
Can somebody tell me what I need to add to the Search of my tables and charts and what I need to do with the tokens?
hi @schufi01,
You can create a dropdown with values with field12 filters- 1* OR 2* (for Data A), 7* (for Data B) and * (Total).
<fieldset submitButton="true" autoRun="false">
<input type="dropdown" token="myfield">
<label>Select Data</label>
<choice value="field12="1*" OR field12="2*"">Data A</choice>
<choice value="field12="7*"">Data B</choice>
<choice value="field12="*"">Total</choice>
</input>
</fieldset>
Use token in your table search query like below:
index=index $myfield$
If this reply helps you, an upvote/like would be appreciated.
hi @schufi01,
You can create a dropdown with values with field12 filters- 1* OR 2* (for Data A), 7* (for Data B) and * (Total).
<fieldset submitButton="true" autoRun="false">
<input type="dropdown" token="myfield">
<label>Select Data</label>
<choice value="field12="1*" OR field12="2*"">Data A</choice>
<choice value="field12="7*"">Data B</choice>
<choice value="field12="*"">Total</choice>
</input>
</fieldset>
Use token in your table search query like below:
index=index $myfield$
If this reply helps you, an upvote/like would be appreciated.
Thank you, helped me a lot
The value in your dropdown can be stored in a token which can be used in the searches for your dashboards. Depending on what your searches look like, will need to set the values of the token appropriately. You refer to the token by surrounding the token name with $ e.g. $token1$