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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using a variable within if in script module

Hi

I have a requirement wherein I need to perform an if else transformation within the edit script on certain condition based on a variable

But when I apply the if condition on the variable to create the field it is giving me an error

For Eg:

The if condition used is

If($(varb)=’ORACLE’,

If(flag=1,-1,

If(flag=0,0)),flag) as FLAG

The error that I see is Oracle not found.

Can any one please let me know what could the issue

Labels (1)
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Try

If('$(varb)'=’ORACLE’,

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Try

If('$(varb)'=’ORACLE’,

Not applicable
Author

Hi Anu,

Try the below one.

If('$(varb)'='ORACLE',

If(flag=1,-1,

If(flag=0,0)),flag) as FLAG

Hope this helps!

--

Vinoth