Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vsabbise
Creator
Creator

Input Box variable always showing IsNull as False in Qlik sense

Hi,

I have an input box with a variable vWord and for some reason if(IsNull(vWord),'T','F') always returns F though I don't enter any values in the input box. 

I am not sure what's causing that. I checked the definition of the variable and intentionally I left it blank.

Labels (2)
3 Replies
marcus_sommer

Blank/Empty isn't NULL - therefore try it with:

 

if(len(trim('$(vWord)')) = 0,'T','F')

 

- Marcus

sidhuchocky
Contributor II
Contributor II

Hi,
Your logic is correct but the syntax is incomplete.
Try this ,
If(IsNull(vWord) = -1 ,'T','F')
This return 'T' if vWord is NULL and 'F' otherwise .
marcus_sommer

It's not mandatory necessary to compare isnull() or similar checkings with = -1 or = 0 because 0 will be always treated as FALSE and each other numerical value is TRUE and therefore the above logic with: if(isnull(var), then else) will work and the issue will be either the variable-call or that isnull() expects a real NULL and not empty/blank/any spaces.

- Marcus