Jump to: navigation, search

Difference between revisions of "Activity:GetObjectsByPropertyValue (Activity)"


(See also)
Line 1: Line 1:
 +
The GetObjectsByPropertyValue queries object [[Instance|instances]] by comparing a named property to a given value.
 
{{ActivityInfoBox
 
{{ActivityInfoBox
 
| title = Get Objects By Property Value
 
| title = Get Objects By Property Value
Line 9: Line 10:
 
| version = 2.1.15+
 
| version = 2.1.15+
 
}}
 
}}
The GetObjectsByPropertyValue queries object [[Instance|instances]] by comparing a named property to a given value.
 
 
 
 
==Arguments==
 
  
 +
===Arguments===
 
{| class="wikitable sortable" | width = "50%"
 
{| class="wikitable sortable" | width = "50%"
 
|-
 
|-
Line 33: Line 30:
 
| PropertyValue|| {{Object_MSDN}}|| In || The value to compare against
 
| PropertyValue|| {{Object_MSDN}}|| In || The value to compare against
 
|- align="left"
 
|- align="left"
| Index|| {{Integer_MSDN}}|| In || The index if an indexed value is to be compared; set to -1 for regular value
+
| Index|| {{Int32_MSDN}}|| In || The index if an indexed value is to be compared; set to -1 for regular value
 
|- align="left"
 
|- align="left"
 
| FirstMatch|| [[BaseClass]] || Out || The first object the query returned
 
| FirstMatch|| [[BaseClass]] || Out || The first object the query returned
Line 40: Line 37:
 
|}
 
|}
  
==Usage==
+
===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.
 
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==
+
=Example=
 
Load the MetaClass named ''PUMP'' and find all instances which have a ''POWER'' greater than 4 kilowatts:
 
Load the MetaClass named ''PUMP'' and find all instances which have a ''POWER'' greater than 4 kilowatts:
 
  
 
{| class="wikitable" | width = "50%"
 
{| class="wikitable" | width = "50%"
Line 64: Line 59:
 
| Index|| <source lang = "vbnet">-1</source>
 
| Index|| <source lang = "vbnet">-1</source>
 
|}
 
|}
 +
 +
{{Activity/End}}
  
 
==See also==
 
==See also==

Revision as of 10:28, 19 March 2015

The GetObjectsByPropertyValue queries object instances by comparing a named property to a given value.

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+

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:
  • QuerySearchItemOperator.Equals
  • QuerySearchItemOperator.NotEqual
  • QuerySearchItemOperator.GreaterThan
  • QuerySearchItemOperator.GreaterAndEqualThan
  • QuerySearchItemOperator.LowerThan
  • QuerySearchItemOperator.LowerAndEqualThan
PropertyValue Object In The value to compare against
Index Integer 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.

[edit]

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


See also