ObjPropertyRemove

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

Purpose

The function ObjPropertyRemove clears the value of an Optiva field from the database.

Syntax

long ObjPropertyRemove(long saveMode, string propertyName, string objSymbol, string objectKey, string rowkey, string keycol)

Arguments

Part Description
saveMode

The placeholder must be 1 or 0 .

Note: This exists only for backward compatibility to older versions and has no function.
propertyName

The propertyName represents the name of the field that needs to be retrieved.

Note: Follow the same steps described for ObjProperty to derive the propertyName of the attribute.
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 key or the current object key of the data.
Note: Use empty quotation marks to indicate the current object of the workflow.
rowKey The key (field name) for the row where the value exists (i.e. table data) is indicated.

Refer to the ObjProperty definitions for keyCol identification. Like ObjPropertySet, ObjPropertyRemove can only be used to clear a specific cell in an existing table. It cannot be used to remove a row from a table. Review DataSet scripting functions to remove table rows.

Unlike ObjProperty, Symbol and Object are required arguments. Use empty quotation marks for the workflow’s object or the new object for the copy method.

Description

ObjPropertyRemove clears the values of a property.

Note: You can override security and change a locked or read-only formula using workflow. Use discretion when overriding security.

Examples

This example removes the Mfg. Item from the Formula > Main tab.


ObjPropertyRemove(0,"ITEMCODE","FORMULA","")

This example clears the value for the date parameter DATEPARAM1.


ObjPropertyRemove(0,"VALUE.TPALL","","","DATEPARAM1",2)

You can clear parameter values with this function by assigning the parameters to set codes; then clear all parameters belonging to the set. When a parameter is cleared, the Level is reset to 0.

In this example, the technical parameters are removed from the ALLERGENS set.


ObjPropertyRemove(0,"VALUE.TPALL","","","SET=ALLERGENS",2)
Example 1: Clear the Mfg. Item from the current formula:
ObjPropertyRemove(0, "ITEMCODE", "FORMULA", "");
Example 2: Clear the Sodium parameter value on Formula REPL\0001:
ObjPropertyRemove(0,  "VALUE.TPALL",
        "FORMULA", "REPL\0001", "SODIUM", "PARAM_CODE");
Example 3: Clear the Target value on the current Specification for the “DEFECTS” parameter:
 ObjPropertyRemove(0, TARGET.TP", "", "", "DEFECTS",
        "PARAM_CODE");

Example 4: Clear the Reference Status for the Vendor ACME on the current Item:

 ObjPropertyRemove(0, "REFSTATUS.REF.V\REFITEM1", "", "", "ACME",
        "OBJECTCODE");

Example 5: Clear the value in the 4th column of the Project extension table with View ID = 2, on line 5:

  ObjPropertyRemove(0, "FIELD4.MATRIX.V\DMPROJECT2", "", "", "5",
        "LINE_ID");