Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
This must be a stupid question, but I get a syntax error (in script page) when breaking the line in a "or"/"and" condition, for e.g:
[This doesnt work]
If x > y or
z > x Then
End If
[This works]
If x > y or z > x Then
End if
Do I need a special char? Like "_" in VBA, for instance..
Hi, 'IF' used as control statement needs to have each clause in the same line: https://help.qlik.com/en-US/sense/November2023/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptCont...
As a workaround you can use a variable to store 1 or 0, here the If() is a function that can use multiple lines, and use this variable in the IF, something like:
LET vCheckConditions = If(x > y or
z > x
, 1, 0);
IF $(vCheckConditions)=1 THEN
Hi, 'IF' used as control statement needs to have each clause in the same line: https://help.qlik.com/en-US/sense/November2023/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptCont...
As a workaround you can use a variable to store 1 or 0, here the If() is a function that can use multiple lines, and use this variable in the IF, something like:
LET vCheckConditions = If(x > y or
z > x
, 1, 0);
IF $(vCheckConditions)=1 THEN
Thank you very much. This will work.