Difference between revisions of "Activity:GetObjectsByPropertyValue (Activity)"
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | The GetObjectsByPropertyValue queries object [[Instance|instances]] by comparing a named property to a given value. | ||
+ | |||
+ | = Description = | ||
{{ActivityInfoBox | {{ActivityInfoBox | ||
| title = Get Objects By Property Value | | title = Get Objects By Property Value | ||
Line 9: | Line 12: | ||
| version = 2.1.15+ | | version = 2.1.15+ | ||
}} | }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ===Arguments=== | ||
{| class="wikitable sortable" | width = "50%" | {| class="wikitable sortable" | width = "50%" | ||
|- | |- | ||
! Argument !! Type !! Direction !! Purpose | ! Argument !! Type !! Direction !! Purpose | ||
|- align="left" | |- align="left" | ||
− | | MetaClass|| MetaClass|| In || The [[MetaClass]] to query | + | | MetaClass|| [[MetaClass]]|| In || The [[MetaClass]] to query |
|- align="left" | |- align="left" | ||
− | | PropertyName|| | + | | PropertyName|| {{String_MSDN}}|| In || The [[MetaProperty]] to use for comparison |
|- align="left" | |- align="left" | ||
− | | Operator|| QuerySearchItemOperator|| In || The compare method, valid operators are: | + | | Operator|| [[QuerySearchItemOperator]]|| In || The compare method, valid operators are: |
* QuerySearchItemOperator.Equals | * QuerySearchItemOperator.Equals | ||
* QuerySearchItemOperator.NotEqual | * QuerySearchItemOperator.NotEqual | ||
Line 31: | Line 30: | ||
* QuerySearchItemOperator.LowerAndEqualThan | * QuerySearchItemOperator.LowerAndEqualThan | ||
|- align="left" | |- align="left" | ||
− | | PropertyValue|| | + | | PropertyValue|| {{Object_MSDN}}|| In || The value to compare against |
|- align="left" | |- align="left" | ||
− | | Index|| | + | | 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 |
|- align="left" | |- align="left" | ||
− | | Result|| List<BaseClass> || Out || The result of the query | + | | Result|| List<[[BaseClass]]> || Out || The result of the query |
|} | |} | ||
− | ==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= | |
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 61: | ||
| Index|| <source lang = "vbnet">-1</source> | | Index|| <source lang = "vbnet">-1</source> | ||
|} | |} | ||
+ | |||
+ | <!-- DO NOT REMOVE THIS -->{{Activity/End}}<!-- DO NOT REMOVE THIS --> | ||
==See also== | ==See also== | ||
* [[Workflow Designer]] | * [[Workflow Designer]] | ||
− | * [[GetObjectsByQuery (Activity)]] | + | * [[Activity:GetObjectsByQuery (Activity)]] |
− | + | [[Category:Activities|GetObjectsByPropertyValue (Activity)]] |
Latest revision as of 09:44, 4 November 2015
The GetObjectsByPropertyValue queries object instances by comparing a named property to a given value.