Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

User-defined functions inside load script

Hi, Is this possible in QlikView?  I'd like to define a function that does some simple math

define addTheseForMe(int a, int b):

     return a+b;

MyTable:

LOAD if(ColA = x AND colB = y, addTheseForMe(ColA,ColY),null())

RESIDENT some_table;

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Hi,

You can do:

SET addTheseForMe = $1 + $2;

MyTable:

LOAD if(ColA = x AND colB = y, $(addTheseForMe(ColA,ColY)),null()) 

RESIDENT some_table;

Regards,

Aurélien

View solution in original post

1 Reply
Highlighted
Partner
Partner

Hi,

You can do:

SET addTheseForMe = $1 + $2;

MyTable:

LOAD if(ColA = x AND colB = y, $(addTheseForMe(ColA,ColY)),null()) 

RESIDENT some_table;

Regards,

Aurélien

View solution in original post