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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

oracle decode in tmap expression builder

Hi I have a decode below but want to have more than one value. How do I separate the expression

 

row1.STATUS.equals("Active")?"1":row1.STATUS   row1.STATUS.equals("Inactive")?"0":row1.STATUS 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

thx really appreciate it now works

View solution in original post

9 Replies
fdenis
Master
Master

(row1.STATUS.equals("Active"))?"1" 0683p000009MPcz.pngrow1.STATUS.equals("Inactive"))?"0":row1.STATUS
Anonymous
Not applicable
Author

What does the happy face mean for a separator? It still doesn't work it only works if I use one value

fdenis
Master
Master

it's not an unhappy face it's : and (
it's the smily translator
fdenis
Master
Master

(row1.STATUS.equals("Active"))?"1"0683p000009MPcz.pngrow1.STATUS.equals("Inactive"))?"0":row1.STATUS

is that better?

fdenis
Master
Master

this translator is **bleep**.
Anonymous
Not applicable
Author

Sorry new to this but below is what I put in and get an error is the syntax correct

 

(row1.STATUS.equals("Active"))?"1":row1.STATUS.equals("Inactive"))?"0":row1.STATUS

fdenis
Master
Master

(row1.STATUS.equals("Active"))?"1": (row1.STATUS.equals("Inactive"))?"0":row1.STATUS

 

it's inline if:

(contition)?ifConditionIsTrue:else

 

so you can write :

(contition1)?ifCondition1isTrue0683p000009MPcz.pngcontition2)?ifCondition2isTrue:else

 

Anonymous
Not applicable
Author

thx really appreciate it now works

fdenis
Master
Master

usually you tag as solve the solution not your post.
0683p000009MA9p.png