Defined Data Structure CRUD Actions
  • 14 Feb 2022
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Defined Data Structure CRUD Actions

  • Dark
    Light

Article summary

Overview

This article will demonstrate performing Create, Read, Update, and Delete (CRUD) actions, via Flow steps, on Defined Data Structures.

CRUD Action Steps: Defined Data Structures [Advanced]
These steps generally DO NOT appear in Steps Panel search results but can be found by navigating to the User Defined Types > Defined Data Structures [Advanced] category.

Getting Started 

Create an Entity Data Structure with applicable attributes, such as the Person example below:


Person
FirstnameString
LastnameString
DOBDate time
Storage Option
When creating a Defined Database Structure, set the Storage Option to DatabaseStored to initialize the CRUD action Flow steps found in User Defined Types.

Setting the storage option to "Database Stored" saves Defined Data Structures in the Database, thus creating a Folder for data storage is not necessary.

Do Not Store Data in Configuration Folders
Case Entities utilize built-in Configuration Folders meant for storing Flows, Rules, and/or other Designer elements that enhance the custom data structure. It is NOT INTENDED FOR PROCESS DATA STORAGE.

Create 

To create a record in the Person Defined Data Structure:

  1. Create a Flow.
  2. Click the Flow Steps panel; expand the User Define Types category.
  3. Expand the Defined Data Structures[Advanced] category.
  4. Expand the Person data structure.
  5. Drag the Create Person step onto the Flow canvas.
  6. Connect it to the Start and End steps.
  7. Set Folder Id to a constant value and pick the Person Entity Data Folder.
  8. On the Item To Create input, change Unknown to Build Data.
  9. Set constant values for Name, Firstname, Lastname, and DOB.

10. Click Debug on the top Action Bar; this will record a save and run the Flow to create that record in the Person Defined Data Structure. 

Auto ID Generation
Despite being initially set to Ignore, note how Decisions auto-generates the record's ID upon creation by the Debug (Flow run) action..

Read

Before an Update or Delete action can be performed, an existing record should first be located, or read.

Fetch Entities Step
The Fetch Entities step finds records by desired attribute and outputs the corresponding record Id.

Update

The Edit Person and Selective Update Person steps in the Flow Steps panel may be used to update an existing record stored in the Person Defined Data Structure.   

Edit vs Selective Update
  • Edit Person step - changes ALL data fields, even if only 1 is specified
    • updates the specified data field(s) to the provided parameter(s)
    • overwrites non-specified parameter(s) to NULL (or Empty) 
  • Selective Update Person step - only changes the data field(s) specified
    • updates the specified data field(s) to the provided parameter(s)
    • ignores non-specified parameter(s), leaving existing data in tact

Edit Person Step

'Selective Update Person' Step

Delete

To remove a record from the Person Defined Data Structure, use the Delete Person step, found nested under User Defined Types > Defined Data Structures [Advanced] > Person in the Flow Steps panel.  Once the required Id is provided as step Input, running the Flow will delete the record from the database associated with that Id.



Was this article helpful?