Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Edi1
Contributor
Contributor

Please verify syntax is formatted correctly

Is this Talend syntax correct or am i missing a variable?

row1.Post_Key() == debit? "60" : "70"

Labels (2)
22 Replies
Edi1
Contributor
Contributor
Author

The post_key() was undefined. Once I removed it from code, it worked.

row1.Post_Key.equals("debit")? "60" : "70"

 

This worked as well:

String.valueOf(row1.Post_Key.equals("debit")? "60" : "70")

 

Thanks gjeremy

gjeremy1617088143

HI Edi, glad you succeed ! you don't have to use String.valueOf() method it's already a String, and you can use the folowing syntaxe to make it null safe : "Debit".equals(row1.Post_Key)?"60":"70"

Edi1
Contributor
Contributor
Author

gjeremy,

Thanks. This was helpful.