Get Entities by Query
Use the Get Entities by Query action to retrieve metadata details of entities based on a query. You can provide the name or number of the Windchill object to retrieve its metadata.
Complete the following steps to use the Get Entities by Query action in your workflow:
1. Drag the Get Entities by Query action under Windchill to the canvas, place the pointer on the action, and then click or double-click the action. The Get Entities by Query window opens.
2. Edit the Label, if needed. By default, the label name is the same as the action name.
3. To add an authentication scheme, refer to Authorize Windchill. By default, Basic is selected. If you previously added an authentication scheme for Windchill, select it from the list.
4. In the Entity Type list, select the appropriate entity type.
5. Under the Filters group, in the Join By list, select one of the following options:
or – Either of the conditions specified under the Filter Clauses group must return true.
and – All conditions specified under the Filter Clauses group must return true.
By default, and is selected.
6. Under the Filter Clauses group, click Add, and do the following:
a. In the Property list, select a property of the selected entity type that you want to filter.
b. In the Matching Condition list, select the appropriate conditional operator.
c. In the Value field, enter the value of the property for the filter.
d. Click Add to add multiple properties to the filter clause. Alternatively, click to delete properties.
7. Under the Select Properties group, click Add, and do the following:
a. In the Property field, select the property that you want to retrieve for the selected entity type.
b. Click Add to add multiple properties. Alternatively, click to delete any property that you added.
By default, all properties of the selected entity are retrieved.
8. Under the Add Related Items group, click Add, and do the following:
a. In the Related Item field, select the related item of the entity that you want to retrieve for the selected entity type.
Click Add to add multiple related items. Alternatively, click to delete any related items that you added.
By default, no related items of the selected entity are retrieved.
9. In the Limit field, enter the number of search results that you want to retrieve.
10. In the Skip field, enter the number of top search results that you want to skip from the result.
11. Click Done.
Output Schema
The output schema for the Get Entities by Query action is a dynamic schema. It changes according to the selected values for the Entity Type,Property, and Related Items fields. The output schema has an array of objects of the selected entity type and an identifier list that is a comma-separated list the Windchill OIDs. The following image shows the default output schema:
If you select Entity Type as Parts, then the output schema is as shown in the following figure:
If you select Entity Type as Parts and set the Property to AssemblyMode, then the output schema is as shown in the following figure:
* 
For example: If you want to map AssemblyMode as an input to the next action, it returns a value like { "Value": "separable", "Display": "Separable" }. If you want to map Value field only, then update the mapping as follows:
{{$a0.Results[0].AssemblyMode.Value}}
If you select Entity Type as Parts and set the Property to AssemblyMode and Related Items to Folder, then the output schema is as shown in the following figure:
Was this helpful?