Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When passing numeric literal as a parameter into a subroutine, QlikView creates extraneous variables with name and value both equal to the parameter. After reloading this script:
SUB subroutine(numeric_parameter);
TRACE $(numeric_parameter);
ENDSUB;
CALL subroutine(1234);
this is the variable overview:
Has anybody else encountered this? If by chance anyone from Qlik sees this - could it be a bug, or if it's working as intended, could you shed some light on why it works this way?
This is not particularly impactful, but I like to write my subroutines so that they clean up after themselves when done. It's kind of hard to do because of this behavior
Yes, this is a known behaviour and discussed e.g. in
Literals as sub parameters become variables
Try passing your number in the call using single quotes or brackets.
CALL subroutine('1234');
CALL subroutine((1234));
Yes, this is a known behaviour and discussed e.g. in
Literals as sub parameters become variables
Try passing your number in the call using single quotes or brackets.
CALL subroutine('1234');
CALL subroutine((1234));