xpfConditionalDeleteInstanceTypes
Â
FUNCTION xpfConditionalDeleteInstanceTypes(modelId : GENERIC; instanceTypesAggrId : AGGREGATE OF GENERIC; condition : STRING; options : INTEGER) deletedInstances : INTEGER;
This function deletes "all instances of the instance type(s) specified in 'instanceTypesAggrId' argument that matches the actual specified 'options, and the optional given 'condition' argument.
Arguments
Type | Name | Comment |
GENERIC | modelId | Specifies the actual EDMdataModel to operate on (delete instances from) |
AGGREGATE OF GENERIC | instanceTypesAggrId | Specifies the actual instance types (entityId) to operate on. This argument has no effect hen the option XPXDELETE_ALL_MATCHING_INSTACNES_IN_MODEL is enabled. |
STRING | condition | An logical EDMexpressX expression that will be evaluated for all "specified" instances. Only those instances that pass the 'condition' and match the specified options, will be deleted. |
INTEGER | options | Â |
Return Value
Â
Type | Name | Comment |
INTEGER | deletedInstances | Number of deleted instances |
Options
Option | Comment |
XPXDELETE_ALL_MATCHING_INSTACNES_IN_MODEL | All instances in the specified model 'modelId' that matches the specified options and the optional 'condition', will be deleted. |
XPXDELETE_INSTANCES_REFERENCING_NO_OTHER_INSTANCES | Only instances that do not use any other instances in any roles, will be deleted |
XPXDELETE_INSTANCES_AND_REFERENCES | Use the xpxDeleteInstanceAndReferences() instead of xpxDeleteInstance() method in the actual "delete instance" operation. |
XPXSUBTYPES | All instances that are subtypes of any of the specified instance types in the 'instanceTypesAggrId' argument, will be included in the actual xpfConditionalDeleteInstanceTypes() operation. |
Â
Example
<Missing Example>