Discussion Board for collaboration on QlikView Scripting.
I'm trying to create a macro user-defined function like this thread:
Function addTheseForMe(var1, var2)
However, when I try to run this in script:
LET varA = 7;
LET varB = 8;
LET varAB = addTheseForMe(varA, varB);
I get this error:
Unexpected token: '(', expected one of: ':', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', ...
LET varAB = addTheseForMe>>>>>>(<<<<<<varA, varB)
What is wrong?
You're falling foul of the new BNF "strict" mode in QV12. You can disable this with the folowing line at the top of your script:
You can turn off this feature for all apps on the machine by updating the settings.ini file - add this line
(You can also switch this off from the settings easter egg. Click Help|About and right click the Qlikview icon in the bottom left corner. Find 'EnableBnfReload' and set it to zero).
View solution in original post
That solved the problem. Thanks very much.
In 12.30 this solution does not work anymore as NBF cannot be disabled.
Are user defined functions not possible anymore or is there another solution?
whats the solution for version 12.4 since BNF cannot be disabled.