Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

isNull(fieldName) is true if select more than one value from fieldName

Hi, all, I am confused of using IsNull here when I use IsNull() to check whether there value from a fieldName is selected or not.

I can understand that if no selection of fieldName, then IsNull(fieldName) is true, but when I select more than one value from the fieldName, the result is also true, which I expect be false.

If that is the case, then how can I identify there is no selection of a field? I need to use the result as a condition to show other object.

Thank you very much~

1 Solution

Accepted Solutions
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

Try this GetSelectedCount(fieldName) > 0

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

3 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

Try this GetSelectedCount(fieldName) > 0

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!
simondachstr
Specialist III
Specialist III

isNull(FieldName) will evaluate to True and is working as designed.

Reason being is that for one row (or in a textbox) FieldName will have multiple values (if you select more than one value). Since FieldName is not deterministic (it can have more than one value) it returns null() or '-'. IsNull() of null() is true.

If you wish to identify if there are no selections in a field, use GetSelectedCount(Fieldname)=0 as Aurelien suggested.

Anonymous
Not applicable
Author

@Martin,

It works!!! Thanks very much for your explanation.

Zhihong