Folder Extension Data Structures

Last Updated: 08/15/2018 Introduced in Version: 2.0

OVERVIEW

Folder Extensions are custom Data Structures that also act as Folders. Folder Extensions can be generated with a default set of Create, Edit, Get and Delete methods, and can also be configured with custom actions using flows.

 

Example

In our example, we will create a Folder Extension called Vehicle. This Folder Extension will include four standard properties of a car: Color, Year, Make and Model. It will also have a default page view called Car Details and a simple action called Send Notification.

 

We will begin in the portal by navigating to a Designer Folder, and then select Create Datatypes > User Defined Type > Folder Extension

Note: This Action can also be found under Datatypes/Database > User Defined Types category on the Folder Actions Panel. 

 

 

 

In the resulting Add Folder Extension Data Structure, give the new Folder Extension the name “Car.” To define the additional properties of this folder, add Name and Type

We will define the first property as “Color” and give it a data type of string. The other options on the screen are:
  • Is List – Indicates that the data member is an array.
  • Encrypt Data – Would encrypt the data of the data member (which would automatically decrypt when used).
  • Override Display Information – Changes the display name for the data member during design time.
  • Override Database Field Name – Renames the database column name.
  • SelectEditor – Allows for a different default editor for the data member during design time.
  • Configure Custom Attributes – Allows for additional custom attributes for the member to be defined.

Next, we will add the additional properties of our folder extension: Year, Make and Model.

 
 
 

Next, define the Type Name Space of our folder extension. This organizational key can be useful for programmers. Because cars are a type of transportation, we will define the Type Name Space as “Transportation”.

Next, define the Actions of our folder extension. To give our new folder extension the same actions as any other folder, select every checkbox. Note that these actions are not controlled by permissions; any user who logs in and can see the folder can use these actions. If you want to lock down these actions according to the groups in which a user is a member, leave the Actions options unchecked. Alternate actions based on a flow would be used instead (See the topic Creating Flow Actions).
 
By selecting the Override Create Action Name check box, you are able to define a new action name for creating folders of this extension type. Define a new action name of “Create Car.”
 
 
 

 

Next, define the behaviors of our Folder Extension. In the Folder Extension Editor, under Behavior check the boxes:

  • Show Default Folder Pages: The portal will now show the default folder.
  • Show In Tree: The Folder Extension will now show in the designer folders folder tree.
  • Define Default Page Name: Will show when the Folder Extension is selected.
  • Default Page Name: (Car Details)

Next, select which flow steps to create for our Folder Extension. These steps will allow us to conveniently create, edit, delete and get folders of this Extension Type. Once the parameters have been defined, select Save.

 
 
Our new Folder Extension will appear in our Designer Folder ready to use. Also, a “Car” data type is available to be used. For example, in a flow: Navigate in the steps tab to Integrations>My Integrations>Folder Extensions>Car and in the Car tab you can see the different behavior options available to use. 
 
 
 
 
Next, define an Action for the Car Folder Extension type.
 
Navigate to the Designer Folder that contains the entities for the project, select Create Datatypes/ Integration choose Configuration Extension and then select Add Folder Actions and Configuration. From this Folder Action Configuration, the action will be created in a flow. 
 
Note: In Decisions 4.0 and newer this Action can also be found under Datatypes/Database > Configuration Extension category on the Folder Actions Panel.
 
 
 
 
In the Type Name field, select the [Transportation.VehicleFolderBehavior] option. Click SAVE
 
 
 
 
Notice a folder under our Designer Folder automatically appears. This is where our action flow will reside. Portal pages and flows that are created in this folder will be used as page templates and actions for instances of the folder extension. Click on this folder then click on the Add Action button.
 
 
 
In the resulting Create Entity Action dialog, call this action “Send Notification” and select Create.
 
 

 

In the Flow Designer, select a Send Notification step from the All Steps [Catalog] > Communication> Send Notification.

Choose Add to add it to the flow designer.

 

 

Next, we will configure the Send Notification step to send a simple notification to your current user or the default portal administrator.

This completes our Action Flow, so we will save our flow and close the Flow Designer.

 
 
 
When we created the Car Folder Extension type, we defined a default page name of “Car Details.” To create this page, in the same Designer Folder as our Send Notification flow, click the Folder Extension to access the actions, click Add Page > Add Existing Page button.
 
 
 
 
 
In the resulting Add Existing Page dialog, select Create. In the Create New Page dialog name the page “Car Details” and select Create. 
 

 

In the Page Designer, select the Page Elements tab search for a Folder Header Data component, drag, and drop. in the page designer. Next, locate a Folder Actions Bar component drag and drop this on the page designer.

 

This completes our default page, so we will save it and close the Page Designer. Return to the Designer Folder. Now create an instance of our Car Folder Extension type, select the Actions menu and select Add > Entity[User Defined]> Create Car.

 

In the resulting Create Car dialog, give this new folder the name “Honda Civic” and complete its attributes. Select OK.

 

When we navigate to Folder Extension Data and Car, we will see the default page we defined earlier.

 

 

To edit this folder, select the Edit Car action. In the resulting pop-up, we will define more properties of the folder, including the description, color, make, model, and year.

To use the “Send Notification” action we defined earlier, we will expand Honda Civics’ action menu and select “Send Notification.”

 

 

The notification we defined in our flow will appear in the top-right corner of the portal screen.

 

Additional Resources