Retrieving Entities with the Fetch Entities Flow StepLast Updated: 07/19/2016 Introduced in Verision: 2.0
The Fetch Entities step is a flow step that allows for fetching of any entity within the system, such as folders, native data types, stored database types, and custom data types. The Fetch Entities step is found in the Toolbox under Integration > Entity Framework. The step allows for filtering on any property for the entity. Note that deleted entities are not retrieved.
We begin in the Designer Folder by clicking Create Flow button from the Folder Actions Panel.
Next, we Name the Flow and click Create to proceed to the Flow Designer.
In the Flow Designer we expand Integrations > All Integrations > Entity Framework and add Fetch Entities step to the workspace.
Then, from the Forms [Interaction] > [Current Folder] in the Toolbox we add a Form that was predesigned for this Flow.
The purpose of this Form is to display fetched Folders with Data Grid component. This Form is designed as following…
We connect steps in our Flow as following…
Then, we need to configure our steps. First, we select Fetch Entities step on the workspace and navigate to the Entity Fetch Definition configurations. In the Type Name textbox we search and select Folder data type.
Next, we select our Form step and choose Select Value Mapping Type for the FoldersList input (which is a name for the Data Grid component on the Form).
Then, using Path selector we pick EntityResults output from the Fetch Entities step.
We select Fetch Entities step again to configure FolderId input. Select Constant Mapping Type.
In the resulting pop-up window we pick System Folder and click Ok.
This completes our Flow. We can click Debug Flow link from the top panel in the Flow Designer to test our Flow.
Note that in Decisions version 3.5 and above, you will need to click Test Flow rather than Debug Flow.
Our Form opens in the Debugger and we can see that all Folders from the System Folder are displayed on the Data Grid component. We close the Debugger.
Back in the Flow Designer we can configure Fetch Entities step to filter fetched entities. In the step configurations we can pick field and filter types. First, we select folderTypeName field.
Then, for the filter type we select Equals. Mention, that new Input for this step appeared. We configure folderInputType input as Constant with ‘Designer Project’ value.
In the same manner we add second filter. This time we select createdOnDate field and choose Less Than filter type. Then, we configure createdOnDate input for this step.
Next, we can Debug Flow again. Our Form opens in the debugger. And we can see that Fetch Entities step fetched only Folders according to the configured filters.