I have two TEXT fields Object and modifier. I want to create dashboard based on either of the field. tried with "if condition", it did not work.
| index=name event=$object$ action=$modifier$ |table content group
-->if both fields are provided no worries
-->if both are not provided then both should be "wildcard(star)"
-->if field1 is specified and field2 is not specified then field2 should be "wildcard(star)"
-->if field2 is specified and field1 is not specified then field1 should be "*"
How to achieve this?
Note:I dont want to achieve this by using * in default value
Lets say you have filter token named as $filter_token$. So what you can do is have onChange event listener on this token and inside that you can check for value of the token and according to that set another token named $search_token$ which will be used in the query. That way you can keep the text input empty and on page load you can initialize $search_token$ to be * which won't show up on the text input that you are displaying.