Hi all,
I am currently working towards generating a user dashboard that requires nothing but text entry and multiselect input values. The user would like to filter by country, but wants an option for any, where it will return results from any country. The current setup is as follows:
searchfunction
$country$
where the $country$ is:
token prefix: | where (
token suffix: )
token value prefix:country="
token value suffix:"
delimiter: OR
for selection "United States" it formats:
searchfunction
|where (country="United States")
for selection of "United States" with "Unknown" it formats:
searchfunction
|where (country="United States" OR country="Unknown"
These return results exactly as expected and desired, but I can't see a way to have an "any" selection without just manually ticking every possible selection. Any ideas would be greatly appreciated.
Kind Regards,
Denym
try adding one in the Static Options. Name is Any value is *
unfortunately * isn't accepted as a valid wildcard with |where. with the static value put as * it still applies the token and token values, so the statement becomes |where (country="*"), which reads as invalid and breaks the outputs.
why are you using "where"? Can you switch it to "search" and get the results you need?
Changing to a search filter and using the * for the static "all" entry worked perfectly for both single county, multi-country and "all" selection, thank you cmerriman.
just as a note, I generally use "where" to compare two fields and search to filter one field.
for instance:
|where count=totalCount
to filter down rows where an event has a count equal to the entire count
|search count>200
to filter down rows where the count is greater than 200