Hi Qlik-Experts,
Is there a way to define a function on the surface in QS that can take parameter values as input?
For example
Calc(A, B) {
return A+B}
If you now define for example Calc(3,5) as KPI 8 should be output.
Thank you for your support
On the script level, you can use Sub ... End Sub. https://help.qlik.com/en-US/sense/September2019/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptCon...
At the object (front end) level, I believe the best solution is to use a variable with $ expressions, e.g. as described here: https://community.qlik.com/t5/QlikView-App-Dev/create-custom-function-with-parameter/td-p/147066
On the script level, you can use Sub ... End Sub. https://help.qlik.com/en-US/sense/September2019/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptCon...
At the object (front end) level, I believe the best solution is to use a variable with $ expressions, e.g. as described here: https://community.qlik.com/t5/QlikView-App-Dev/create-custom-function-with-parameter/td-p/147066
Hi @SonPhan
If you want to implement these function inside the load script, yes, you can, I compiling a document about variables, I already wrote and tested this section:
Multi-Parameters Function as Variables
We could define multi-parameters functions as well, we declare them with a LET in the load script, while we just create them as usual in the sheet’s variables section; in this example we consume the function at 3 different places:
Comments:
Function Variables Summary
Hope this helps,
Hi @SonPhan
This is the topic where Function Variables was explained Click Here