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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
EV89
Contributor III
Contributor III

Error tmap with local variables and if statement to perform a check

Hi Gurus 

 

I have set a local variable process to perform a control check on my partita iva (italian vat number). I don't understand why there is incompatibility error and why i cannot use if statement.

 

Please see attaches

 

thanks for your help

 

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

You cannot use "if" there because what you write as an expression appears on the right side of the variable affectation. Let's say if you variable is called v1, the generated code will be "var1 = your expression" (have a look at generated code).
So the solution is to replace the "if" by a ternary expression such as "row1.field1 > 1 ? 1: 0".

View solution in original post

2 Replies
akumar2301
Specialist II
Specialist II

TRF
Champion II
Champion II

You cannot use "if" there because what you write as an expression appears on the right side of the variable affectation. Let's say if you variable is called v1, the generated code will be "var1 = your expression" (have a look at generated code).
So the solution is to replace the "if" by a ternary expression such as "row1.field1 > 1 ? 1: 0".