- 23 Feb 2022
- 3 Minutes to read
- Print
- DarkLight
Folder Extension CRUD Actions
- Updated on 23 Feb 2022
- 3 Minutes to read
- Print
- DarkLight
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.
Example
In this tutorial, a Folder Extension Data Structure was created with the following fields:
FEPerson | |
Firstname | String |
Lastname | String |
DOB | Date 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.
Create
To create a record in the Person Folder Extension Data Structure
- To begin, in a Designer Folder, select CREATE FLOW from the Global Action Bar.
- In the resulting Create Flow dialog, select and name the default Flow [FE CRUD]. Click CREATE to enter the Flow Designer.
- 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.
- 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.
- Navigate to the INPUTS > Extension Data field and change the input mapping to Build Data.
- 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.
- 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.
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 GenerationNotice 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
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.