RemoveContextAttrib
You can use this function for Optiva Workflows and Copy Methods.
Purpose
Removes an object from one, several or all context attributes.
Syntax
Dim variable As Long = RemoveContextAttrib(Symbol, Object, AttribCode, Value1 [, Value2,...])
Arguments
Part | Description |
---|---|
Symbol |
Type of object. Use empty quotation marks to indicate the symbol of the object for the workflow, or for the new object for a copy method. |
Object |
Object for which to remove the context attributes. Use empty quotation marks to indicate the object for the workflow, or the new object for a copy method. |
AttribCode |
The type of attribute whose context is removed. Use these codes:
|
Value1 |
First attribute that is removed from the object. To remove all attributes, use empty quotation marks. |
Value2 |
Optional. Additional attributes to which the object should be removed. |
Description
Use this function to delete the context attribute values from an object.
Examples
This example removes ACME
and GENERIC
as brands for the PIZZASAUCE\003
formula.
Dim lRemovebrand As Long = RemoveContextAttrib("FORMULA",
"PIZZASAUCE\003","C_BRAND","ACME","GENERIC")
This example removes all selling location attributes from the workflow or new object.
Dim lRemovelocation As Long = RemoveContextAttrib("","", "SELLOC","")
This example checks if the workflow’s object belongs to the FROZEN
set code. If so, the FRESH
product type attribute is removed from the object.
Dim lSet As Long = HasSetCodes("","","FROZEN")
if (lSet = 1) then
Dim lRemoveproduct As Long
RemoveContextAttrib("","","C_PRODTYPE", "FRESH")
end if