- 07 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
Folder Extension Data Structures
- Updated on 07 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
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. The Folder behaves just like any other Portal Folder in that actions can be performed on each Object in the Folder and use the Folder in reporting.
Example
In this example, create a Folder Extension called Vehicle and create a default Page view called Car Details.
Create Folder Extension
- Begin in the portal by navigating to a Designer Folder.
- Select CREATE DATATYPES/INTEGRATIONS > User Defined Type > Folder Extension.
- In the resulting Add Folder Extension Data Structure, give the Folder Extension the name "Vehicle."
- Next, define the behaviors of the Folder Extension. In the Folder Extension Editor, under Behavior check the following boxes:
Name: Description: Show Default Folder Pages: The portal will now show the default Folder. Show In Tree: The Folder Extension will now show in the Designer Folder's Folder tree. Define Default Page Name: Will show when the Folder Extension is selected. Default Page Name: "Vehicle Details" - To define the additional properties of this Folder, add Name and Type. Add Color, Year, Make, and Model.
- Define the first property as "Color" and give it a Data Type of string. The other properties on each type are:
Name: Description: Is List: Indicates that the data field is an array. Encrypt Data: Would encrypt the data of the data field (which would automatically decrypt when used). Override Display Information: Changes the display name for the data field during design time. Override Database Field Name: Renames the database column name. Select Editor: Allows for a different default editor for the data field during design time. Configure Custom Attributes: Allows for additional custom attributes for the member to be defined. - Define the Type Name Space of the Folder Extension. This organizational key can be useful for programmers. Because cars are a type of transportation, define the Type Name Space as "Transportation."
- Next, define the Actions of the Folder Extension. To give the Folder Extension the same actions as any other Folder, select every checkbox.These actions are not controlled by permissions; any user who logs in and can see the Folder can use these actions. 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.
- By selecting the Override Create Action Name checkbox, users can define a new action name for creating Folders of this Extension type. Define a new action name of "Create Vehicle."
- The Folder Extension will appear in the Designer Folder ready to use. To create a new Vehicle, select Add > Entity [User Defined Type] > Create Vehicle.
- This action will show a Form with a property grid showing each property of the Folder Extension. Fill in the Form and select OK.
Create Page
- While creating the Vehicle Folder Extension type, a Default Page was named "Vehicle Details." To create this Page, select the Folder Extension Configuration Folder.
- From the Action Menu, select Create Page > Add Existing Page.
- In the resulting Add Existing Page dialog, select CREATE. In the Create New Page dialog name the Page "Vehicle Details" and select CREATE.
- In the Page Designer, select the Page Elements tab.
- Search for a Folder Header Data component, and then drag and drop it onto the Page.
- Next, locate a Folder Actions Bar component. Drag and drop this on the Page Designer.
- Add a Form Tile that will display the image of the Vehicle.
- This completes the default Page. Save and Close the Page Designer. Return to the Designer Folder.
- Navigate to Folder Extension Data and open the 2019 Ford Expedition, see the default Page that was just created. To learn more about creating Pages, navigate to the Creating your First Page document.
Adding Actions
To add actions, navigate to the Configuration Folder. Any Flow added in this type of Folder will create an Action available for use on that Folder Extension. It is possible to create multiple Folder Action Folders and in some cases, it is recommended. Reasons to create more than one Action folder are to better organize by functionality and to apply security by restricting users to see only Folder Actions relevant to them. For example, restricting the ability to edit a Form, or granting permission.