ObjectExists
You can use this function for Optiva Workflows and Copy Methods.
Purpose
This function verifies the existence of an object key for a specific symbol.
Syntax
int ObjectExists(string objKey, string objSymbol)
Return Value
The function returns 0 if object does not exist and 1 if exists.
If the code is successful and the object exists a value one (1) is displayed, zero (0) if it does not exist.
Arguments
| Part | Description |
|---|---|
objSymbol |
The object type or current object type of the data.
Note: Use empty quotation marks to indicate the current symbol of the workflow.
|
objkey |
The object key or current object key of the data.
Note: Use empty quotation marks to indicate the current object of the workflow.
|
Description
ObjectExists determines if an object key exists for a symbol and can be used to check if an object key, such as a particular formula or item, already exists.
- If the object does not exist, then a value of 0 is returned.
- If an object does exist, then a value of 1 is returned.
Examples
In these examples, ObjectExists determines if the formula or item with the specified key exists. For formulas and specifications, you must include a backslash (\) followed by a version number.
Dim iExists As Integer = ObjectExists("PIZZASAUCE\003", "FORMULA")
iExists = ObjectExists("OLIVE_OIL","ITEM")
Example 1: int iExixts = ObjectExists("PIZZASAUCE\003", "FORMULA");
Example 2: int iExists = ObjectExists("OLIVE_OIL", "ITEM");
Example 3: int iExists = bjectExists("", "");