Poking Arguments

From Pengower
Jump to: navigation, search

Any Action Script that has arguments associated with it must ensure that the first lines of the script use them in some way. If an argument isn't used (or 'poked') as soon as possible, later reference to the argument may return spurious results.

For this reason it is suggested that the first lines of an Action Script move the values of any arguments to local variables.

For good measure, ensure that 0 or "" is added to the argument to ensure the result is of the expected type.

2 // tm OHA Case Save
4 // arguments OHACase entity the case to be saved
5 // NoAudit integer boolean allowing auditing to be suppressed
6 // APIUserString string Optional username for auditing for API calls
8 // poke the arguments
9 Set case = OHACase
10 Set noAudit = 0 + NoAudit
11 Set apiUserString = "" + APIUserString

See Also

How to Create Action Scripts

How To Define a Long Running Script

Script Action Library

Run Script