Workflow examples
In this example, PRIMARYFORMULAIND
is one (1) for the default Symbol
and ObjectKey
, making the object a master formula.
ObjPropertySet(1,0,"PRIMARYFORMULAIND","","")
For this example, the status of PIZZASAUCE\003
is 300
(engineering). Use STATUSIND
, HOLDCODE
, APPROVALCODE
like other details, not as header data.
ObjPropertySet(300,0,"STATUSIND.STATUS","FORMULA", "PIZZASAUCE\003")
If this statement were for the workflow’s object, then use empty quotation marks for the symbol and object key.
ObjPropertySet(300,0,"STATUSIND.STATUS","","")
In the next example, the TOTFAT
equation total parameter in TOMATOES
is 0.
ObjPropertySet(0,0,"VALUE.TP2","ITEM","TOMATOES", "TOTFAT", "2")
The relevant rows of the database table are shown here.
VALIDATION_CODE | VALIDATION_RECFMT | VALIDATION_SUBCODE | FIELD_NAME | FIELD_NO |
---|---|---|---|---|
G.TECHPVAL |
A |
KEYCODE |
200 |
|
G.TECHPVAL |
A |
TOTFAT |
VALUE |
300 |
In this example, QUALITY
is the hold status for PIZZASAUCE\003
.
ObjPropertySet(QUALITY,0,"HOLDCODE.STATUS", "FORMULA", "PIZZASAUCE\003")
In this example, date is removed by setting an empty string to the date parameter, DATEPARAM1
.
ObjPropertySet("",0,"VALUE.TPALL","","", "DATEPARAM1", 2)
Marking formulas for rollup
To mark the object for rollup, the property ROLLUPID
is negative one (-1).
ObjPropertySet(-1,0,"ROLLUPID")
Specifying values of ingredients in a formula
Use ObjPropertySet
to specify a single value of an ingredient in a formula. In this example, ObjPropertySet
sets the amount of an ingredient, ITEM01
, in the formula.
Run the workflow on the formula. The property name is of the format:
FIELD_NAME.INGR.VALIDATION_RECFMT
The FIELD_NAME and VALIDATION_RECFMT come from the FSValidationField
table. Look for the VALIDATION_CODE entries of G.FORMINGRED
. These are the properties of ingredients in a formula that you can specify using ObjPropertySet
.
The RowKey
is the item code for the ingredient. The ColumnKey
is always ITEMCODE
.
ObjPropertySet(2.43,0,"QUANTITY.INGR.A","","", "ITEM01", "ITEMCODE")
Specifying the Test Order field on the Test form
The TESTORDERCODE field in the Test form is set to the name of a test order for an existing Test object.
ObjPropertySet(TestOrderInstanceName,0,"TESTORDERCODE",
"TESTRESSEARCH","TestDataEntryInstanceName")
Specifying Ref Status on the References tab
In this example, the Approval event is for the action that is associated with the label object. The event updates the Ref Status field for a label reference on the Formula form.
'Get Keycode
Dim oKeycode As String = Objproperty("KEYCODE","", "")
'Get Label Version
Dim oVersion As String = Objproperty("KEYCODE2","", "")
'Join Label Code and Label Version
Dim sLbl As String = oKeycode & "\" & oVersion
'Get Formula code linked to the label object
Dim oFormula As Object = Objproperty("FORMULACODE.LFORM","", "","*")
'Update refstatus field in on the Formula References tab.
ObjPropertySet(40,0,"REFSTATUS.REF.V\REFFORMULA7","FORMULA", oFormula, sLbl, "OBJECTCODE")
Specifying the group code for a formula
This example reads a value from the input form and replaces the existing GROUP_CODE for a formula.
Dim sGroup As String = WipParamGet("JCS_GROUP")
ObjPropertySet(sGroup,0,"GROUPCODE.PER","","")
Return 111