RemoveSetCodes

You can use this function for Optiva Workflows and Copy Methods.

Purpose

Removes an object from one, several, or all set codes.

Syntax


Dim variable As Long = RemoveSetCodes(Symbol, Object, Code1[, Code2,...])

Arguments

Part Description
Symbol Type of object. Use empty quotation marks to indicate the symbol of the object for the workflow, or the new object for a copy method.
Object Object to be removed from the set codes. Use empty quotation marks to indicate the object for the workflow, or the new object for a copy method.
Code1 First Set code from which you want to remove the object. To remove the object from all set codes, use empty quotation marks.
Code2 Optional. Additional set codes from which to remove the object.

Description

RemoveSetCodes removes a system object from a set. For example, a formula can be assigned to the FDA set, which indicates formulas with FDA approval. If a formula has to be retested under new guidelines, then run a workflow to remove the formula from the set.

A newly created object is automatically added to the set code for the lab. You cannot remove this set code.

Examples

This example removes the PIZZASAUCE\003 formula from the SUB set.


Dim lRemoveset As Long
RemoveSetCodes("FORMULA","PIZZASAUCE\003", "SUB")

The next example removes the workflow object or newly-created object from the TOP_COAT and SEALANT sets.


Dim lRemoveset As Long
RemoveSetCodes("","","TOP_COAT","SEALANT")

In this example, the script checks if the workflow object or newly-created object belongs to a program. If not, the script removes the object from all sets.


Dim oProgram As Object = ObjProperty("PROJECTCODE")
Dim iBlank As Integer = IsBlank(oProgram)
if (iBlank = 1) then
   Dim lRemoveset As Long = RemoveSetCodes("","","")
end if