Discussion Board for collaboration on QlikView Scripting.
IsNull(MyField) and Len(MyField) = 0 seem to do pretty much the same, as in they can both be used to check if a field is empty.
Does anybody know if they are fully interchangeable or are they in some way different ?
Best Regards, Bill
Solved! Go to Solution.
A good point to think of. See, here an interesting analysis that would clear doubts.
Isnull('') ->0 // which is FALSE !!!!!!
Hence you can conclude both are NOT fully interchangeable.
So you are saying that '' is not exactly the same as Null().
Would I be correct in thinking that on a database :
What I am after is creating a Flag where the field is empty, so I think it would be better for me to check using Len(MyField) = 0 as that covers all 'emptiness', as opposed to IsNull(MyField) which would only flag true nulls.
Is my understanding correct ?
Best Regards Bill
The below expression covers all the scenerio's like Null & Empty Fields validation:
IF(LEN(TRIM(FieldName),'Field neither Null nor Empty' , 'Field either Null or Empty') AS FieldCheck
Generally in the Qlikview, the 0 value is always False and any other no is True.