Get Properties
The entity type is the fundamental building block for describing the structure of data with the Entity Data Model (EDM). In a conceptual model, entity types are constructed from properties and they describe the structure of top-level concepts such as customers and orders in a business application. Similarly, a class definition in a computer program is a template for class instances, an entity type is a template for the entities. An entity represents a specific object such as a specific customer or order. Each entity must have a unique entity key within an entity set. An entity set is a collection of instances for a specific entity type. Entity sets, and association sets are logically grouped in an entity container. Inheritance is supported with entity types—one entity type can be derived from another.
Use this action to fetch records of an entity type. You have a choice to fetch records by Selection or Query. Query provides additional filtering options on records. Selection is useful when the identifier for a specific entity type is available and it can be provided to the action to fetch its details.
Using the Get Properties Action
To use this action in your workflow, connect it to ThingWorx Flow. To connect to the flow, do the following:
1. Drag the Get Properties action under the OData connector to the canvas, place the pointer on the action, and then click or double-click the action. The Get Properties action window opens.
2. Edit the label name, if needed. By default, the label name is same as the action name.
3. To add a new authorization, refer to the Authorizing OData section in the OData connector topic.
* 
If you previously added an OData authorization, select an authorization from the list.
4. In the Find By field, filter the OData items using one of the following options:
Selection—Find the OData items based on the entity set and a list of identifiers. For more information, refer to the section Finding OData Items Using a Selection.
Query—Find the OData items by querying the entity sets. For more information, refer to the section Finding OData Items Using a Query.
Depending on the option you select, the output schema changes. For more information on the output schema that appears, refer to the section Output Schema.
Finding OData Items Using a Selection
Select the entity set or perform filtering on an entity set based on a list of identifiers.
1. In the procedure for Using the Get Properties Action, follow steps 1 through 3 and in step 4, for the Find By field select Selection. The Entity Set and Entity Identifiers fields appear.
2. Select an option from the Entity Set list. Depending on the entity type selected, a few more fields appear.
3. In the Entity Identifiers field, enter a comma separated list of entity identifiers. You can map the list of identifiers from the previous action or triggers.
4. Click + to view the additional fields:
In the Select Attributes field, specify an array of entity properties which needs to be included as a part of an action output. If no property is specified, all the entity properties appear in the output.
In Add Related Items field, specify an array of navigation properties or associations which are included as a part of an output schema for an action such as masterid associated with the Account entity set.
If no related items are specified, then navigation property does not appear in the output. For more information on the output schema that displays, refer to the Output Schema section.
5. Click Done.
Finding OData Items Using a Query
Use this option to define specific criteria to filter out the OData items.
1. In the procedure Using the Get Properties Action, follow steps 1 through 3 and in step 4, for the Find By field select Query. A list of entity sets from the OData domain appear.
2. In the Entity Set field, select an option from the list.
3. In the Join By field, specify a logical operator that joins the filter clauses. The default value is and.
Click Add to enter multiple filter criteria.
4. In the Filter clauses section, click Add to add the following filter clauses:
Property—Select the property to search.
Condition—Select a matching condition. The matching condition options depend on the type of the property selected such as String, Boolean, and so on.
Property Value—Enter a property value.
Click Add to add multiple filter clauses. The entities are filtered based on the selected Join By operator and the filter clauses that are set. For example, if you set OR as a join by operator and set two filter clauses, then the entities matching either or both filter clauses appear.
5. In the Order By field, select the following details:
Attribute
Order
6. Click + to view the additional fields:
In the Select Attributes section, click Add to add new attributes.
For Add Related Items, click Add to add navigation properties or associated properties of an entity type.
In the Limit field, enter a value to limit the action output to a specified number of entities.
In the Skip field, enter a value to skip the specified number of items returned by the server.
Select an option from the Count list, and then click Done.
Output Schema
The Get Properties action returns a dynamic output schema depending on the entity type that you select.
See a sample output schema when you set the Find By option as a Query, and then select the entity set as People in the figure that follows:
Was this helpful?