HI,
I have the following drop down. It returns a list of numbers
For example: 2, 6, 7, 45 etc... random.
I need to be able to set the number X even if X is not in the list returned. Or Y or Z the use picks the value.
<input type="dropdown" token="Token_Duration_MAX_Time" searchWhenChanged="true">
<label>Duration_MAX_Time</label>
<choice value="*">All</choice>
<search>
<query>| tstats summariesonly=true values(All_TPS_Logs.duration) AS Duration FROM datamodel=TPS_V4 WHERE nodename=All_TPS_Logs host=$host_token$ All_TPS_Logs.user=* OR NOT All_TPS_Logs.user=* All_TPS_Logs.operationIdentity="*" GROUPBY All_TPS_Logs.duration
| rename All_TPS_Logs.duration as Duration
| sort Duration
| table Duration</query>
<earliest>$tps_selection.earliest$</earliest>
<latest>$tps_selection.latest$</latest>
</search>
<fieldForLabel>Duration</fieldForLabel>
<fieldForValue>Duration</fieldForValue>
<default>NO_Value</default>
Thanks in advance
Rob
@robertlynch2020 Is your problem resolved? If so, please accept the answer to help future readers.
Hi,
Try below:
Test - XXX
<input type="dropdown" token="field1">
<label>field1</label>
<choice value="111">111</choice>
<choice value="123">123</choice>
<search>
<query>index="_internal"| stats count by date_hour</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<fieldForLabel>count</fieldForLabel>
<fieldForValue>count</fieldForValue>
</input>
You can choose any value instead of 111 or 123.
So that you can get values in dropdown, from dynamic search as well as hard coded.
In my case I am getting below values in dropdown:
111
123
+ values from dynamic search...
Thanks, (I should have been more specific) i am looking for any value that the use will enter dynamically.
I don't want to have to update the dashboard each time
Are you looking for something like below scenario:
Test - XXX
<input type="text" token="user_input_tok">
<label>User Input</label>
</input>
<panel>
<table>
<title>Testing</title>
<search>
<query>index="_internal"| top limit=$user_input_tok$ date_hour</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<option name="drilldown">none</option>
</table>
</panel>
Put any value in a textbox and enter.
Modify user search query as per your requirement.
You cannot enter input in a dropdown, you can create a textbox for user to enter the input and add that input to your dropdown list or your query.