The "External Update" stub function |
DEVELOPER |
The stub function @VIPSB21 exposes the Tool Engine's internal scratch variables so that they can be manipulated as desired.
For example, complex string manipulations on attributes can be achieved by setting one of the variables to the value of the attribute, calling the external update to manipulate and return the variable, then setting the value of the attribute from that of the variable.
The stub can be used to call other external updates, read or update external files, display dialogues etc.
As with the other stub functions supplied with PROIV Developer, it is not overwritten when PROIV Developer is upgraded so can be maintained as desired. Note that the Function’s parameters should not be altered as additional parameters may become available in future versions.
The Input parameters
The first three parameters, Tool Name, Sub List id and Line number can be interrogated to trigger code that is specific to each tool / line. The next input ($Parameter) contains the value of the ‘with parameter’ that can be defined against the current ‘call external update’ action.
These variables can be interrogated (IF/CASE) to trigger code paths in the stub update, link to external functions etc.
The Master Object is the object in the work or global list which is being processed.
The Type value defines the type of Master Object and is one of the following:
AX - ActiveX Control Definition
FL - File Definition
FN - Function
GL - Global Logic
GM - Global Message
TK _ Task Definition
VV - Value Variable
If the Fail Flag is set to 'Y' or the Error Description is populated, processing of the Master Object is aborted and if an automatic back-up has been made then it restored to the original version.
Setting the Reject flag to 'Y' will abort further processing of the current record/object only.
There are several variables which can be queried to identify the type of object/record being processed and contain its identifying tag or keys:
The Parent tag is the tag id of the object which 'owns' the record or object currently being processed. E.g. for a screen File Accessor, it will be the field on which it is read.
The Cycle tag is the tag id of the cycle which ‘owns’ the record or object currently being processed, and may or may not be the same as the Parent tag.
Object, Parent and Cycle tags do not apply to all records which can be processed. In such cases, the other keys variable is used for uniqueness.
In the case of Error Messages, the value of other keys will be E for function error messages, or G for Global Logic Error messages.
For Interface Map entries, the parent tag is the name of the Interface Map itself, the object tag contains the map entry sequence (line) and the other keys variable contains the name of the Global Function called with this interface map.
For Function Description text, the parent tag contains the function name, and the object tag contains the description sequence (line).
For Function Scratch Variables, the parent tag contains the function name, and the object tag contains the variable name.
Topic ID: 500398