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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Moro
Contributor
Contributor

tmap trimming an entry - problem when entry is empty (cannot invoke "String.substring(int,int)" because "row.A" is null)

Hi all!

I have been trying to trim an entry in a table but I keep getting the following error:

Cannot invoke "String.substring(int,int)" because "row.A" is null

The way I did it:

In tmap I tried to check first if the entry is empty and then do the trimming like the following

row.A == null ? row.A : (row.A.length() >10 ? StringHandling.LEFT(row.A,4):row.A)

It is not working. Any suggestions from your side?

Thank you!

Labels (2)
10 Replies
Moro
Contributor
Contributor
Author

So true! Thank you very much! It works!