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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Blank value handling in tmap

Hi Team ,
In my source input file I have null and blank value which I need to populate in separate file .
For Null I have implemented below logic , but do not know how do I handle blank values ..Please help me with logic
row2.aaa==null|| row3.bbb==null
Labels (2)
6 Replies
Anonymous
Not applicable
Author

You have nulls handled. Do you mean empty Strings ("")? If so, you need to check like this....
row2.aaa==null||row2.aaa.trim().compareToIgnoreCase("")==0|| row2.bbb==null||row2.bbb.trim().compareToIgnoreCase("")==0

First you need to check for null for your object, then check for an empty String. The "trim()" is there to remove spaces (if spaces are OK, you will need to remove that section), the "compareToIgnoreCase()" is used to compare the value to "" (an empty String).
Anonymous
Not applicable
Author

IH team ,
Please look the screen shot below values
Arow   Brow
add1   end2
null    end3
         deie
ww                      

Few values ==null
Few values==empty (with outspace)
few values== with space ...
I need to capture .. no data but .. there is space. (similar to null buut with space only)
Can u please tell me how can I do this
Anonymous
Not applicable
Author

I am not sure what you want. The solution I added above will help you capture null, " ", "      ", and "". The only thing you will need to refine is the logic. The above code will accept all of those values. If you want to filter them out, you will need to use  NOTs and ANDs.
Anonymous
Not applicable
Author

Above solution is not working it says invalid , my question is very simple I need to handle string which has length , but no value ( string with blank )
Anonymous
Not applicable
Author

The solution will work, but maybe your implementation of it has errors. It is easier if you post exactly what you are doing (ie post your code) then we can tell you what is wrong.
Anonymous
Not applicable
Author

Also can you give the exact error message and datatypes involved?