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

Handling "null" and “” or ‘’ or ‘ values.

Hi,
I have used a input field (String) and wants to validate the field
in Tmap component - (Java project)
How to validate and replace the value 0 if null or ?? or ?? or ? values comes for that particular field in input.
Please let me know your pointers and updates.
Using the below expression i can able to check the null condition alone but not the
?? or ?? or ? values in input
row1.T_amount == null? "0" : row1.T_amount;
Thanks and regards,
Manikandan.R
Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hello guy
try
row1.T_amount.equals("\"\"")? "0" : row1.T_amount    //for ""

row1.T_amount.equals("\'\'")? "0" : row1.T_amount    //for ''

row1.T_amount.equals("\'")? "0" : row1.T_amount    //for '

Best regards
shong
Anonymous
Not applicable
Author

The above solutions leads to Java error.
Please let me know if any other ways to handle the special charecters.
Thanks and Regards,
Mani.
Anonymous
Not applicable
Author

Hello
What's the java error message?
Can you show us your source file?
Best regards

shong