- 24 Aug 2023
- 5 Minutes to read
- Print
- DarkLight
Advanced Data Grids
- Updated on 24 Aug 2023
- 5 Minutes to read
- Print
- DarkLight
Overview
Similar to a Data Grid, the Data Grid (Advanced) Form control displays a list of Objects in a Grid, with each row representing an Object and each column representing an Object property.
Instead of defining columns within the control properties like with the Data Grid, the Advanced Data Grid directs users to the Report Designer via the EDIT [Data Grid Name] REPORT under the SOURCE category. In contrast, a Data Grid only allows selection from the columns provided by the Form control with limited grouping options for these columns. Therefore, Advanced Data Grids provide more flexibility than Data Grids.
Example
- In the Designer Project, create a Flow. It will automatically open in the Flow Designer.
- After the start step, add a GetAll step found via Integrations > All Integrations > Internal Services > Account Service,
- After the GetAll step, add a Show Form step to create a new Form. It will automatically open in the Form Designer.
- In the Form Designer, expand the Data section of the Toolbox and add the Data Grid [Advanced] to the Form. Add a Button named 'Submit.'
- Navigate to the Data Grid [Advanced] Properties panel; under Type, search for and select "Account." Under Input > Input Data Name, enter 'Account Adv Data Grid'.
- Under Source, select EDIT ADVANCED DATA GRID REPORT. This automatically opens the Advanced Data Grid in the Report Designer.
- In the Report Designer, under Data Fields, select Add.
- Add the following fields: Email Address, First Name, and Last Name. The options available in the Data Fields dropdown are based on the Advanced Data Grid's Type.
- Save and close the Report Designer and then Form Designer to return to the Flow Designer.
- In the Flow Designer, select the Show Form step. Under Inputs > Account Adv Data Grid, select Pick and choose GetAll1_Output.
- Connect the path from the Show Form step to the End step.
Debug
- Select the Debug button from the top action bar in the Flow Designer.
- Select Start Debugging.
The Data Grid [Advanced] will show the list of accounts with the selected Data Fields from the Source Report.
Passing outputs from the Data Grid
Users can pass the output from the Data Grid to the subsequent steps in a Flow. This output may include data that users have interacted with. Grid Mode setting under the properties tab of the Data Grid and Advanced Data Grid gives designers the ability to pass the user-interacted data as output. For more information, refer to Using Grid Mode in Data Grid/Advanced Data Grid.
Hiding Actions
Users may create Action Visibility Rules to hide both custom Actions and default Actions such as 'Delete', 'Manage', etc for Objects within an Advanced Data Grid.
The following example describes how to hide the default 'Delete' Action to unspecified accounts in an Advanced Data Grid.
- Entity Action Visibility - steps between these articles are similar but with some changes for Advanced Data Grids
- Entity Structure CRUD Actions
- In a Designer Folder, create an Entity Data Structure named 'TestEntity' with the following data fields with their respective data types: Date, String, and Boolean. Save once complete.
- Back in the Designer Folder, create a new Flow. Name it 'TestData' and open it in the Flow Designer.
- Create example data for display in the Advanced Data Grid by using Create Actions explained in the Entity Structure CRUD Actions article.
- Once configured, save and exit the Flow Designer.
- Back in the Designer Folder, create or open a Flow. Name it 'Hiding Actions on Advanced Data Grid Flow' and open the Flow in the Flow Designer.
- In the Flow Designer, add the Fetch Entities step and connect the Start step to it. This step populates the Advanced Data Grid according to specified criterion. Select it.
- For Type Name, select the created Entity Data Structure aka 'TestEntity'.
- In the Flow Designer, add the Show Form step. Connect the Fetch Entities Step and end step to it, as shown below.
- Select the Show Form step and create a new Form to open it in the Form Designer.
- In the Form Designer, add an Advanced Data Grid, Data Grid Add, Data Grid Remove, and a Button to the Form. The Button will serve as the 'Submit' outcome.
- Select the Advanced Data Grid to open its Properties. Under Source, select the created Entity Data Structure as the source of the Advanced Data Grid.
This example will use an Entity Data Structure filled with sample data: 'TestEntity.' Once selected, the Report Designer will open. - In the Report Designer, 'TestEntity' will be listed as the Report's Data Source. Add data fields from the entity: Date1, String1, and Boolean1. Save and exit the Report Designer.
- Right-click on the Entity's Configuration Folder right-click open the Action Menu. Select the Action Visibility Rule, name it 'Hide Delete', and select CREATE to open it in the Rule Designer.
- To configure this Action to affect unspecified accounts, select Select Data Element > Flow Data > Initiating Account > Email Address. Select NEXT. Select Is Not in the condition menu. Select NEXT.
For the Email Address prompt, enter the Email you are testing on. This condition defines which unspecified accounts are affected by this Rule. This example uses an admin account, but any account will suffice. - Select DONE to save the Rule condition.
- Select the orange 'Add' button underneath the recently created condition. Select 'Add Condition'. This new condition will specify the Action to hide.
- Select Select Data Element > Action > Name. Select NEXT. Select Equals in the condition menu. Select NEXT. For the Action Name prompt, enter 'Delete. Select DONE.
- Save and exit the Rule Designer. Return back to the Designer Folder.
- If already logged into the specified account, log out and log into an unspecified account. In this example's case, this is any account that is not admin@decisions.com.
- Once logged into an unspecified account, navigate to the Designer Folder hosting this example. Open it.
- Run the 'Hiding Actions on Advanced Data Grid Flow' and right-click an Entity to view its Actions.Designer Folder not visible on the other account?Permissions for the Designer Folder may need editing to allow the second account to view and run stored Elements. Refer to our About Folder & Portal Permissions article for further details.
Debug
Visible
When logged in with the account associated with the specified email address, the Delete Action is available to use.
Hidden
After logging in with an unspecified account, the Delete Action is no longer available.