Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
could you please let me know is it possible to use user defied subroutine as like built-in function. For example built-in function sum we can use for summing of values. similarly can we define subroutines and can we use anywhere in the app?. I mean in Expressions. Thank you very much in advance for your help.
Regards,
GK
You can store expressions in variables and pass parameters to them. For example:
A variable vSumOfField with one parameter: sum($1)
An expression using the variable and passing as paramter value the field name Amount: =$(vSumOfField(Amount))
This way you can build you're own subroutines. You can't use UDF coded in for example C/C++ or java. There does exist a hidden easter egg setting AllowMacroFunctionsInExpressions that allows you to use functions created in the macro editor in expressions.
thank you for reply. here is simple example for my requirement.
sub mySum(a,b)
gksum=a+2+b-2 //gksum is defined variable
ENDSUB
now can I call mySum subroutine in expressions?
Thank you.
No. You can't use subroutines in expressions.