AddSetCodes
You can use this function for Optiva Workflows and Copy Methods.
Purpose
Assigns an object to a set code.
Syntax
Dim variable As Long = AddSetCodes(Symbol, Object, Code1, [Code2, Code3...])
Arguments
Part | Description |
---|---|
Symbol
|
Type of object. Use empty quotation marks to indicate the current symbol for the workflow or the new object for a copy method. |
Object
|
Object code to be added to set codes. Use empty quotation marks to indicate the current object for the workflow or the new object for a copy method. |
Code1
|
First set code to assign the object. |
Code2
|
Optional. Additional set codes to assign the object. |
Description
AddSetCodes
assigns a system object to a set. For
example, a formula can be assigned to the FDA set, which indicates formulas
with FDA approval. Sets are used to enhance lookups.
A set code can be added manually to an object by opening the object and using the Set Classification dialog.
See the Infor PLM for Process Application Configuration Guide.
Examples
In this example, the
PIZZASAUCE\003
formula is added to the
SAUCE
and
PIZZA
set codes. The
Symbol
and
ObjectKey
can be left as empty quotation marks to
indicate the formula of the workflow. For formulas and specifications, you must
include a backslash (\) followed by a version number if you include the object
code.
Dim lSet As Long = AddSetCodes("FORMULA", "PIZZASAUCE\003","SAUCE",
"PIZZA")
In this example, the workflow or new object is added to the
SAUCE
and
TOP
set codes.
Dim lSet As Long = AddSetCodes("","","SAUCE","TOP")
In this example, the
TOMATOES
item is added to the
SAUCE_INGRED
set code.
Dim lSet As Long = AddSetCodes("ITEM","TOMATOES", "SAUCE_INGRED")
Copy Method example
You can construct a copy method where the user selects one or more
sets to assign the new object. This example assumes that the fourth and fifth
Auto Code
segments allow the user to select from a
list of sets.
Dim lSet4 As Long
Dim lSet5 As Long
Dim rc As Long
lSet4 = CopyMethod.Context.GetSegData(4)
lSet5 = CopyMethod.Context.GetSegData(5)
rc = AddSetCodes("","", lSet4, lSet5)