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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
abhi90
Creator II
Creator II

Multiple if-else in Expression Field of a column in tmap

Hi All,
Hope everyone is doing well. 😊
I have a scenario where I have to derive error_code in error_code column of tmap. Value will be like 1,2,3
Scenario is like
Condition1==false?"2":Condition2==null?"1":Column3 less than -1 or column 4 less than -1?"3":"".
I have tested upto "1" which is working fine. Bad data going to Error Table and giving proper Error Code. Can I write multiple If after "1"?
@vboppudi, @rhall, @TRF
Labels (2)
1 Solution

Accepted Solutions
vboppudi
Partner - Creator III
Partner - Creator III

I think you can write if condition. Are you getting any error?

 

Regards.

View solution in original post

4 Replies
vboppudi
Partner - Creator III
Partner - Creator III

I think you can write if condition. Are you getting any error?

 

Regards.

Anonymous
Not applicable

It looks like you have kind of the right idea from your pseudo code, can elaborate on what the issue is?

manodwhb
Champion II
Champion II

@abhi90,yes you can use nested if condition in tMap.

abhi90
Creator II
Creator II
Author

Yes it's Possible.Thanks for all of your suggestions again 0683p000009MACn.png .Marking this Port as resolved. Did below

(Var.v_FLG==false?"2":
row1.ACCOUNT_NAME==null?"1":
Double.parseDouble(row1.column1)<=-1D || Double.parseDouble(row1.column2)<=-0.001 || Integer.parseInt(row1.column3)<=-1 || Integer.parseInt(row1.column4)<=-1 || Integer.parseInt(row1.column5)<=-1 || Integer.parseInt(row1.column6)<=-1 || Integer.parseInt(row1.column7)<=-1 || Integer.parseInt(row1.column8)<=-1 || Integer.parseInt(row1.column9)<=-1 || Integer.parseInt(row1.column10)<=-1 || Integer.parseInt(row1.column11)<=-1 || Integer.parseInt(row1.column12)<=-1?"3":"10")