Retrieving Entities with the Fetch Entities Flow Step

Last 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.

 

Example

This example will fetch folders and display them in a folder list on a form.

We begin in the Designer Folder by clicking Create Flow button from the Folder Actions Panel.

 createFlow

Next, we Name the Flow and click Create to proceed to the Flow Designer.

 nameFlow

In the Flow Designer we expand Integrations > All Integrations > Entity Framework and add Fetch Entities step to the workspace.

 addFetchEntitiesStep

Then, from the Forms [Interaction] > [Current Folder] in the Toolbox we add a Form that was predesigned for this Flow.

 addForm

The purpose of this Form is to display fetched Folders with Data Grid component. This Form is designed as following…

 formDesign

We connect steps in our Flow as following…

 connectSteps

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.

 typeForFetchStep

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).

 selectValForForm

Then, using Path selector we pick EntityResults output from the Fetch Entities step.

 mapTheOutputForForm

We select Fetch Entities step again to configure FolderId input. Select Constant Mapping Type.

 selectValForFolderID

In the resulting pop-up window we pick System Folder and click Ok.

 pickFolder

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.

3.5 Test Flow Shot

 debugFlow

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.

 resultFirstDebug

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.

 addFilterOne

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.

 finishFilterOne

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.

 addSecondFilter

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.

 secondDebugResult

 

Additional Resources