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: 
Anonymous
Not applicable

IF/else statement usage in tMap

Hi - I have a problem in applying the if/else condition in tMap. I am trying to do below validations in tMap.
if (in.stop_seq == 1 && in.message_status == 10 && in.message_type == 40) 'AA'
else if (in.stop_seq == 1 && in.message_status == 10 && in.message_type == 45) 'X3'
else if (in.stop_seq == 1 && in.message_status == 10 && in.message_type == 50) 'AF'
else if (in.stop_seq == 2 && in.message_status == 10 && in.message_type == 40) 'AB'
else if (in.stop_seq == 2 && in.message_status == 10 && in.message_type == 45) 'X1'
else if (in.stop_seq == 2 && in.message_status == 10 && in.message_type == 50) 'CD'
My source is a db2 and trying to populate a output filed based on this condition. As am new to this, tried all possible options but didn't work. Could you please help?
Note:In my screenshot attached, i tried with one input value to check and populate the target.
Thanks in advance!!!

Labels (2)
32 Replies
Anonymous
Not applicable
Author

hello

i want to do this condition with tmap

Répéter VU_ALIM_TABLEAU_INTEGRATION.DATE + 1 Jusqu’à Date d’expédition - 1

please can anyone help me please and thanks

Anonymous
Not applicable
Author

Hello,

Your requirement is not very clear for us.

Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina

Anonymous
Not applicable
Author

I'm using
row.startdate.after(row.validity_start_date) && row.startdate.before(row.validity_end_date) ? ID : null

But below error

Java.lang.nullpointerexception
At java.util.date.getmillisof(unknown source)
At java.util.date.before(unknown source)

What's the alternate?