Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create a macro user-defined function like this thread:
https://community.qlik.com/thread/115191
Function addTheseForMe(var1, var2)
addTheseForMe= var1+var2
End Function
However, when I try to run this in script:
LET varA = 7;
LET varB = 8;
LET varAB = addTheseForMe(varA, varB);
I get this error:
Syntax 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:
///$bnf off
You can turn off this feature for all apps on the machine by updating the settings.ini file - add this line
EnableBnfReload=0
(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).
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:
///$bnf off
You can turn off this feature for all apps on the machine by updating the settings.ini file - add this line
EnableBnfReload=0
(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).
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.