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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Getting equals cannot be resolved or is not a field Error in tmap?

Hi all,
I add row1.internal.equals("y")?"Y":row1.internal in tmap. And 
internal  filed data type is character.When i run job i'm getting "equals cannot be resolved or is not a field" Error.
Thanks in Advance.
Regards,
Kumar.talend
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thanks Umesh.
It's working fine.But i'm try to Replace null value in tmap it is not working.
row1.internal.equals(null)?'':row1.internal or row1.internal==null?'':row1.internal
Thanks,
kumar

View solution in original post

9 Replies
Anonymous
Not applicable
Author

Hi Talend Kumar,
try this:
(row1.internal).equals("y")?"Y":row1.internal

MathurM
Anonymous
Not applicable
Author

check with this statement. 
 row1.internal.equals('y')?'Y':row1.internal
Anonymous
Not applicable
Author

Thanks Umesh.
It's working fine.But i'm try to Replace null value in tmap it is not working.
row1.internal.equals(null)?'':row1.internal or row1.internal==null?'':row1.internal
Thanks,
kumar
Anonymous
Not applicable
Author

Looks like the variant without parenthesis and single quotes works
Anonymous
Not applicable
Author

Thanks Whitenorm,
Where should i remove parenthesis in logic?
Thanks,
kumar
Anonymous
Not applicable
Author

Try with this statement.
"null".equals(row1.internal) || row1.internal==null?' ':row1.internal

check once. 
Anonymous
Not applicable
Author

Hi Umesh,
Thanks a lot.
It is working.Here i have 2 doubt.
1)If have remove "space" in single quotes,statement is not working(row1.internal==null?'':row1.internal)?
2) Why statement is working for single quotes( like row1.internal.equals('y')?'Y':row1.internal)
    Not working for Double  quotes(like row1.internal.equals("y")?"Y":row1.internal?
Thanks,
kumar
Anonymous
Not applicable
Author

your source and target data type is char which will expect char for comparing that is way double quotes not worked whereas single quotes worked. 
Anonymous
Not applicable
Author

Thanks Umesh