Folder Extension CRUD Actions
  • 23 Feb 2022
  • 3 Minutes to read
  • Dark
    Light

Folder Extension CRUD Actions

  • Dark
    Light

Article Summary

Overview

Folder Extensions are custom Data Structures that also act as Folders. The Folder behaves just like any other Portal Folder, this meaning that actions can be performed on each Entity in the Folder and the Folder can be used in Reports. The following article will demonstrate how to use the Create, Update, and Delete steps in a Flow using a Folder Extension Data Structure.

CRUD Action Steps: Folder Extension
In the Flow Designer's Toolbox, Create, Update, and Delete steps cannot be searched for. Users will have to navigate to USER DEFINED TYPES > FOLDER EXTENSION to add CRUD actions to the workspace.

Example

In this tutorial, a Folder Extension Data Structure was created with the following fields:  

FEPerson
FirstnameString
LastnameString
DOBDate time

Folder Extensions store data in Decisions, however, users will have to create a Normal Folder to store the process data. In this example, a Normal Folder [FE Person Data] was created.

Do Not Store Data In The Configuration Folder
Data Structures that are a part of the Decisions Entity Framework will automatically have a Configuration Folder. Do not store data within that Folder. The Configuration Folder is meant for creating Flows, Rules, and other Designer elements to enhance that custom Data Structure. For more information, please navigate to the Configuration Folder article.

Create

To create a record in the Person Folder Extension Data Structure

  1. To begin, in a Designer Folder, select CREATE FLOW from the Global Action Bar. 
  2. In the resulting Create Flow dialog, select and name the default Flow [FE CRUD]. Click CREATE to enter the Flow Designer.
  3. In the Flow Designer, from the Toolbox > USER DEFINED TYPES > FOLDER EXTENSIONS > FEPERSON section, drag and connect a Create FEPerson step to the Start and End steps.
  4. In the Properties panel > INPUTS > Parent Folder ID field, set the input mapping to Constant and select the Normal Folder [FE Person Data] that was previously created.
  5. Navigate to the INPUTS > Extension Data field and change the input mapping to Build Data.
  6. Notice the appearance of new inputs, change the input mapping from Ignore to Constant on DOB, FirstName, and LastName.
    In this example, the input values are as follows: DOB: 3/1/2021, FirstName: Jill, LastName: Doe.
  7. INPUTS > Folder Description and Folder Name have an input mapping that is set to Constant.
    In this example, the input values are FE Person Description and FE Folder Name, respectively.
  8. Select Debug from the Top Action Panel, this will save and open the Debugger. Decisions will create a record in the Person Folder Extension Structure.

    Auto-ID Generation
    Notice that the ID was automatically created when the Flow was run, even though its input mapping was set to Ignore.

Update

To update an existing record in a Folder Extension Data Structure, locate the Edit Person step in the Toolbox > USER DEFINED TYPES > FOLDER EXTENSION section. This step will change every data field in the object, even if only one data field has been changed.  In order to change any record in a Data Structure, the Fetch Entities step will be required to fetch a particular record and then it will pass the Id of the record to be changed into the Edit step.

Edit Person step

When using the Edit Person step, notice it is configured similar to the Create Person step in the Properties panel > INPUTS > Extension Data where the input mapping is set to Build Data, and FirstName, LastName, and DOB are configured with a Constant mapping and random values. The Folder ID will have a Select From Flow mapping and EntityResults, then First, then EntityId will be input in the value field. The Folder Name and Description reflect "New Person Data" and "New Person Description", respectively.
If the Edit step is used to change one field, that field will update with the new value, and all unchanged fields will be set to Null or Empty.

Delete

To remove records from a Data Structure, the recommended step is the Delete Person step found in the Toolbox >  USER DEFINED TYPES > FOLDER EXTENSION > FEPERSON. This step will expect an Id as an input. Once an INPUTS > Id has been provided, running the Flow will delete that record from the Data Structure.

The Id can be found by selecting EntityResults, drilling down to First, then EntityId. 


Was this article helpful?