RenameObject

You can use this function for Optiva Workflows.

Purpose

The function RenameObject assigns a new name to any Optiva object and modifies the version for version based objects like Formula, Specification, Label Content.

Syntax


long RenameObject(string objSymbol, string objKey, string newObjKey)

Return Value

If the code is successful a value greater than zero (0) is displayed.

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 type or current object key of the data.
Note: Use empty quotation marks to indicate the current object of the workflow.
newObjKey The expected new name to the symbol must be provided.

Description

RenameObject assigns a new name and version to a formula, label content, or specification. It replaces the name of the object, but does not make a copy of the object. This function refreshes on-screen data.

Examples

In this example, a new name and version number are assigned to the current workflow specification.


Dim lNewname As Long = RenameObject ("","","LOWFAT\0001")

In this example, a specification is identified.


Dim lNewname As Long
RenameObject ("SPECIFICATION", "FAT\0001","LOWFAT\0001")

Example 1:

RenameObject("SPECIFICATION", "FAT\0001","LOWFAT\0001");

Example 2:

RenameObject("FORMULA", "FLOUR\001", "FLOUR\002");

Example 3:

RenameObject("ITEM", "GARLIC", "BREAD");