If i understand your query right, you don't want to use * but you want to explicitly specify values like val1 OR val2 etc
To do this you'll have to add a few lines(lines 6 - 12) to the end of the query as shown here
index=XXX "app"=D forwApp=$App$ host=$host$
| rename resStatus as s
| eval Tstatus=case(like(s, "1%"),"Informational",like(s, "2%"),"Success",like(s, "3%"),"Redirection",like(s, "4%"),"Client Error",like(s, "5%"),"Server Error")
| search Tstatus="$field3$"
| dedup s
| rename s as search
| appendpipe
[| format]
| rename search as label
| eval value=label
| eval label=if(match(label,"OR"), "ALL", label), sortord=if(label=="ALL", 0, value)
| sort sortord
The sortord is just there to ensure that ALL appears first on the list. you can omit that if you don't need it.
Your input will just have the following.
<input type="dropdown" token="status" searchWhenChanged="true">
<label>Select response status code:</label>
<fieldForLabel>s</fieldForLabel>
<fieldForValue>s</fieldForValue>
<search>
<query>index=XXX "app"=D forwApp=$App$ host=$host$
| rename resStatus as s
| eval Tstatus=case(like(s, "1%"),"Informational",like(s, "2%"),"Success",like(s, "3%"),"Redirection",like(s, "4%"),"Client Error",like(s, "5%"),"Server Error")
| search Tstatus="$field3$"
| dedup s
| rename s as search
| appendpipe
[| format]
| rename search as label
| eval value=label
| eval label=if(match(label,"OR"), "ALL", label), sortord=if(label=="ALL", 0, value)
| sort sortord</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
</search>
</input>
Note: This will only work if your search has any results. IF not, your input will never populate
Hope this helps
Cheers!
... View more