Steps to define a global function
- Go to Constants tab
- Click the Add function button
- Define function name as constants KEY
- Define function definition in JavaScript editor next to KEY
- Call the Global function from any operation with KEY as the function name with required arguments
Things to note while defining global functions
- Function definition should be an anonymous function with required arguments
- Global functions do not have direct access to context variables like $TRANSACTION and others, but you can pass context variables as an argument to Global function.
Example: Define the global function LEFTPAD
Example: Use global function LEFTPAD in one of the operations
var paddedStr = LEFTPAD("1234", 6); // 001234
Comments
0 comments
Please sign in to leave a comment.