Define InfoTable
Use this action to construct an infotable data structure that can be used as an input to other ThingWorx actions or to return data as an output from the workflow.
Using the Define InfoTable Action
To use this action in your workflow, connect it to ThingWorx Flow. To connect to a flow, do the following:
1. Drag the Define InfoTable action under the ThingWorx connector to the canvas, place the pointer on the action, and then click or double-click the action. The Define InfoTable 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 connection, refer to the section Adding a Connection in the ThingWorx connector topic. The default value is ThingWorx App Key.
* 
If you previously added a ThingWorx connection, select a connection from the list.
4. In the Data Shape list, select the appropriate data shape.
5. Depending on the version of ThingWorx Flow installed, do one of the following:
If you have ThingWorx Flow 8.4.x, under the Field Definition Mappings section, map the Input data from previous actions on the right-hand panel to the fields of the selected data shape.
If you have ThingWorx Flow 8.5 installed, under the InfoTable section, map the Input data from previous actions on the right-hand panel to the fields of the selected data shape.
* 
With ThingWorx Flow 8.5 and later, you can create nested infotables using this action.
6. Click Done.
Building an Infotable from an Array
When building an infotable from an input array, use the Collection Selector list or the Iterator list to specify the array to loop through when the action is executed. The resulting infotable structure will then have a corresponding row for each row in the input array. If you want to build an infotable with a single row, then leave the Collection Selector field or Iterator field blank.
* 
The values in the Iterator list are auto-populated only after you map any property under the Input section to the field of the data shape.
Example: In ThingWorx Flow 8.4.x
In the above example, an infotable is to be constructed from the array of part information being returned from the previous Get Properties action. The Collection Selector field is mapped to the Parts array, and BOMType is mapped to the alertType field.
The asterisk (*) displayed in the infotable fields denotes that the infotable has multiple rows depending on the input array.
Example: In ThingWorx Flow 8.5
In the above example, an infotable is to be constructed from the array of entity information being returned from the previous Get Content action. Name and Number are mapped to the EntityName and EntityNumber fields of the infotable data shape. The Iterator field is mapped to the Entities array. File Name is mapped to FileName and the Contents array is mapped to EntityContents.
The asterisk (*) displayed in the infotable fields denotes that the infotable has multiple rows depending on the input array.
In this example, this action creates an infotable where each row contains an entity name, entity number and a table of file names for all the contents in that entity.
Dynamic Output Schema
The Define InfoTable action returns a dynamic output schema.
Example: In ThingWorx Flow 8.4.x
The following figure shows the output schema when you select the AlertDefinition data shape:
Example: In ThingWorx Flow 8.5
The following figure shows the output schema when you select the EntityDetails data shape: