Execute Functions
In OData, functions are a way to add server-side operations that are not easily defined as CRUD operations such as create, retrieve, update and delete on entities.
Functions can return data. Functions are useful for returning information that does not correspond directly to an entity or collection.
A function can target a single entity or a collection. In OData terminology, this is the binding. You can also have unbound functions, which are referred to as static operations on the service.
Use this action to execute the functions as analysed from OData metadata.
Using the Execute Functions Action
To use this action in your workflow, connect it to ThingWorx Flow. To connect to the flow, do the following:
1. Drag the Execute Functions action under the OData connector to the canvas, place the pointer on the action, and then click or double-click the action. The Execute Functions 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. Select a OData Function to execute. The fields for input in the Execute Functions action window change, depending on the OData function that you select.
5. Enter the property details, and then click Done.
Dynamic Output Schema
The Execute Functions action returns a dynamic output schema depending on the OData function that you select. If the action does not have a return type, it returns a message string.
See a sample output schema in the figure that follows when you select the GetNearestAirport function:
Was this helpful?