Get Thing Properties
Use the Get Thing Properties action to get property values from a Thing, Thing Template, or Thing Shape.
Complete the following steps to use the Get Thing Properties action in your workflow:
1. Drag the Get Thing Properties action under ThingWorx to the canvas, place the pointer on the action, and then click or double-click the action. The Get Thing Properties window opens.
2. Edit the Label, if needed. By default, the label name is the same as the action name.
3. To add a ThingWorx connector type, refer to Supported ThingWorx Connector Types.
If you previously added a connector type, select the appropriate Connector Type, and under Connector Name, select the connector.
4. Click TEST to validate the connector.
5. Click MAP CONNECTOR to execute the action using a connector that is different from the one that you are using to populate the input fields. In the Runtime Connector field, provide a valid ThingWorx connector name. For more information about MAP CONNECTOR, see Using Map Connector.
6. In the Find By list, select one of the following options to filter ThingWorx entities:
Query
If you select the Thing Template or Thing Shape query, this action retrieves the properties or selected properties for all the Things that implement the selected Thing Template or Thing Shape.
If you chose Selection in the Find By list
a. Select Form to provide inputs for individual input fields listed in the form, or select Assign JSON to specify a single JSON with all required inputs.
If you chose Form
Under the Things section, do the following:
a. In the Thing list, select the Thing.
b. Under Properties, in the Property list, select the Thing property whose details you want to fetch.
Click Add to add multiple Thing properties. Click to delete any Thing property that you added.
c. Click Add to add one more Thing. Proceed to add properties for this Thing.
The following image shows how you can add multiple Things:
1—Click Add to add multiple properties for a Thing.
2—Click Add to add one more Thing.
OR
If you chose Assign JSON
In the Things field, provide all required inputs in the [{"thing":"string", "propList":[{"name":"string"}]}] format.
b. Under the Property History section, do the following:
a. In the Order - Oldest First list, select true to view the oldest ThingWorx entities first; otherwise select false.
b. In the Start Date and Time and End Date and Time fields, click to filter property history between a start and end date and time.
c. In the Limit field, provide the number of property history occurrences that you want to fetch in the output.
OR
If you chose Query in the Find By list
a. Under the Filters section, do the following:
a. In the Limit field, provide the number of ThingWorx entities that you want to fetch in the output. The default is 500.
b. Provide a Name Mask.
c. Provide a Query to filter the results.
d. Under the Tags group, click Add, and select values in the Vocabulary and Vocabulary Term lists.
Click Add to add multiple tags. Click to delete any tag that you added.
b. Under the Property History section, do the following:
a. In the Order - Oldest First list, select true to view the oldest ThingWorx entities first; otherwise select false.
b. In the Start Date and Time and End Date and Time fields, click to filter property history between a start and end date and time.
c. In the Limit field, provide the number of property history occurrences that you want to fetch in the output.
OR
If you chose ThingTemplates and Query in the Find By list
a. Select Form to provide inputs for individual input fields listed in the form, or select Assign JSON to specify a single JSON with all required inputs.
If you chose Form
Under the Templates section, do the following:
a. In the Template list, select the Thing Template.
b. Under Properties, in the Property list, select the Thing Template property whose details you want to fetch.
Click Add to add multiple Thing Template properties. Click to delete any Thing Template property that you added.
c. Click Add to add one more Thing Template. Proceed to add properties for this Thing Template.
The following image shows how you can add multiple Thing Templates:
1—Click Add to add multiple properties for a Thing Template.
2—Click Add to add one more Thing Template.
OR
If you chose Assign JSON
In the Templates field, provide all required inputs in the [{"template":"string", "propList":[{"name":"string"}]}] format.
b. Under the Filters section, do the following:
a. In the Limit field, provide the number of ThingWorx entities that you want to fetch in the output. The default is 500.
b. Provide a Name Mask.
c. Provide a Query to filter the results.
d. Under the Tags group, click Add, and select values in the Vocabulary and Vocabulary Term lists.
Click Add to add multiple tags. Click to delete any tag that you added.
c. Under the Property History section, do the following:
a. In the Order - Oldest First list, select true to view the oldest ThingWorx entities first; otherwise select false.
b. In the Start Date and Time and End Date and Time fields, click to filter property history between a start and end date and time.
c. In the Limit field, provide the number of property history occurrences that you want to fetch in the output.
OR
If you chose ThingShapes and Query in the Find By list
a. Select Form to provide inputs for individual input fields listed in the form, or select Assign JSON to specify a single JSON with all required inputs.
If you chose Form
Under the Thing Shapes section, do the following:
a. In the Thing Shape list, select the Thing Shape.
b. Under Properties, in the Property list, select the Thing Shape property whose details you want to fetch.
Click Add to add multiple Thing Shape properties. Click to delete any Thing Shape property that you added.
c. Click Add to add one more Thing Shape. Proceed to add properties for this Thing Shape.
The following image shows how you can add multiple Thing Shapes:
1—Click Add to add multiple properties for a Thing Shape.
2—Click Add to add one more Thing Shape.
OR
If you chose Assign JSON
In the Thing Shapes field, provide all required inputs in the [{"shape":"string", "propList":[{"name":"string"}]}] format.
b. Under the Filters section, do the following:
a. In the Limit field, provide the number of ThingWorx entities that you want to fetch in the output. The default is 500.
b. Provide a Name Mask.
c. Provide a Query to filter the results.
d. Under the Tags group, click Add, and select values in the Vocabulary and Vocabulary Term lists.
Click Add to add multiple tags. Click to delete any tag that you added.
c. Under the Property History section, do the following:
a. In the Order - Oldest First list, select true to view the oldest ThingWorx entities first; otherwise select false.
b. In the Start Date and Time and End Date and Time fields, click to filter property history between a start and end date and time.
c. In the Limit field, provide the number of property history occurrences that you want to fetch in the output.
7. Click Done.
Output schema
The Get Thing Properties action returns a dynamic output schema.
Was this helpful?