I am trying to create a dashboard that has a dropdown input eg:
<input type="dropdown" token="HWStat" searchWhenChanged="true">
<label>HW Status</label>
<choice value="*">All</choice>
<choice value="Installed">Installed</choice>
<default>*</default>
<initialValue>*</initialValue>
</input>
Oh, sorry, I missed that part.
You can check if the length of the value is over a certain length and if it isn't, set it to null. Then fillnull :
| eval hw_stat_column=if(len(hw_stat_column) > 2, hw_stat_column, null())
| fillnull value="N/A" hw_stat_column
Easiest way to get around it is using fillnull in your search after your stats.
| fillnull value="N/A" hw_stat_column
in my OP I mentioned:
(I've tried to set all blank fields to null using fillnull, and some appear to be either a white space or blank).
and wasn't displaying those..
Oh, sorry, I missed that part.
You can check if the length of the value is over a certain length and if it isn't, set it to null. Then fillnull :
| eval hw_stat_column=if(len(hw_stat_column) > 2, hw_stat_column, null())
| fillnull value="N/A" hw_stat_column
(no worries, I appreciate the help)
I tried this but didn't really like it:
Here's the high level of what I tried:
I had the closing parenthesis for len() in the wrong place. My bad. I've updated it above.
oh boy, I should have caught that too.. d'oh! Thanks for your help, this now appears to work as expected.
I would have preferred to have been able to keep the blanks in the table I created as it was sourced from 4 different datasources, and the blanks were much easier to see when there were issues to be 'spotted'. But alas, like all data, nulls and spaces are our worst enemies, so massaging to things like N/A are needed....
too bad "*" didn't just work for ALL and ANYTHING 🙂