GetObjectsByPropertyValue (Activity)
Revision as of 11:08, 23 February 2015 by KNO (Talk | contribs) (moved GetObjectsByPropertyValue (Activity) to GetObjectsByPropertyValue (Activity): Text replacement - "(.*)\(Activity\)" to "Activity:$1(Activity)")
Get Objects By Property Value | |
---|---|
Name | GetObjectsByPropertyValue |
Purpose | Query obejcts by a property value |
Category | Object Primitives |
Returns | The result of the query |
Version | 2.1.15+ |
The GetObjectsByPropertyValue queries object instances by comparing a named property to a given value.
Contents
Arguments
Argument | Type | Direction | Purpose |
---|---|---|---|
MetaClass | MetaClass | In | The MetaClass to query |
PropertyName | String | In | The MetaProperty to use for comparison |
Operator | QuerySearchItemOperator | In | The compare method, valid operators are:
|
PropertyValue | Object | In | The value to compare against |
Index | Integer MSDN | In | The index if an indexed value is to be compared; set to -1 for regular value |
FirstMatch | BaseClass | Out | The first object the query returned |
Result | List<BaseClass> | Out | The result of the query |
Usage
This activity is used to find UBIK® instances during the execution of a workflow, by comparing a named property to a given value. Technically this activity creates a query for a single property on the fly and executes it.
Example
Load the MetaClass named PUMP and find all instances which have a POWER greater than 4 kilowatts:
Argument | Value |
---|---|
MetaClass | UBIKObject.Environment _ .GetSystemMetaClass(SystemObjects.METACLASS) _ .AllInstances("PUMP") |
PropertyName | "POWER" |
Operator | QuerySearchItemOperator.GreaterThan |
PropertyValue | 4 |
Index | -1 |