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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hobanwashburne
Creator
Creator

Script syntax to continue on the next line

I have a large nested if statement and would like to format it as follows:

if(Branch = 991, 'Export',

if(Branch = 322, 'Export non Group',

if(Channel = 5, 'Sample Account',

...

if(Channel = 9, 'Legacy', 'Potential'))))) as AccountType,

Is there a character I can place at the end of a line (such as after 'Export', ) that indicates that the command is continued on the next line?

1 Solution

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

The carriage returns are ignored by the expression editor so you are good from a functional standpoint.

Is it merely to document the expression for another developer ?

View solution in original post

3 Replies
JonnyPoole
Former Employee
Former Employee

The carriage returns are ignored by the expression editor so you are good from a functional standpoint.

Is it merely to document the expression for another developer ?

maxgro
MVP
MVP

your script already works in Qlik

hobanwashburne
Creator
Creator
Author

Thank you both, I discovered the source of the error was an extra comma.

I'm re-scripting someone else's work who used VERY large nested if statements. I want to view the code like my example for my own understanding and hopefully find a better way of going about it.