Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
guillermo_welch
Contributor II
Contributor II

Use more than 9 parameters in User Defined Functions

I'm trying to generate a user defined function with more than 9 parameters, but when qlikview reaches $10, it substitutes $1 for the first parameter, and leaves the 0 behind it.

The UDF is:

SET UDF =

    If($2  > 0, $1  / $2  * $3  / ($(_AUXUDF($2, $3,    $5, $6,    $8, $9,    $11, $12))), 0) +

    If($5  > 0, $4  / $5  * $6  / ($(_AUXUDF($2, $3,    $5, $6,    $8, $9,    $11, $12))), 0) +

    If($8  > 0, $7  / $8  * $9  / ($(_AUXUDF($2, $3,    $5, $6,    $8, $9,    $11, $12))), 0) +

    If($11 > 0, $10 / $11 * $12 / ($(_AUXUDF($2, $3,    $5, $6,    $8, $9,    $11, $12))), 0);

¿Can somebody point me in the right direction?

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

The documentation doesn't mention whether it supports more than $1 to $9.

$0 actually gives you the last parameter

By testing I have discovered that it will not work with anything except 0..9 as the character after $.

View solution in original post

2 Replies
petter
Partner - Champion III
Partner - Champion III

The documentation doesn't mention whether it supports more than $1 to $9.

$0 actually gives you the last parameter

By testing I have discovered that it will not work with anything except 0..9 as the character after $.

guillermo_welch
Contributor II
Contributor II
Author

I have arrived to the same conclusion. I managed to join several parameters into a string to save parameters.