I have a dashboard with textbox used for a search. I would think this is simple but don't see any examples of this out there. I only want to run the dashboard query if the token (textbox) has a value in it. If it does, then run the query, which does work on its own. But if not, then don't run it.
|eval result = if(isnull($LotNumber$),"", sourcetype=xyx |search $LotNumber$) | table result
is your textbox input (token) in your query? The search shouldn't run if it is waiting for a token. the panel would say "Waiting for Input" or something like that until a token was submitted via textbox. In your search, you would just need something like field=$LotNumber|s$
It is in my query. I simply want:
sourcetype=xyz |search $LotNumber$
This works, but when the page first loads, I get all the results from sourcetype=xyz. I basically want it to wait for the input, then do the search. Likewise, once one is searched, if you were to clear out the textbox and click submit, you would get nothing again (like page load)
Just in case you never figured this out - you should edit the source so that instead of
<search>
.....
it should be
<search depends="$yourtoken$">
....