Displaying Lists of Objects in a Data Grid
  • 27 Jul 2022
  • 1 Minute to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Displaying Lists of Objects in a Data Grid

  • Dark
    Light

Article summary

Overview

The Data Grid form component displays a list of data objects in a grid, where each row in the grid represents an object, and each column represents an object property - much like a spreadsheet.

Example

This example will populate a Data Grid with accounts from the Portal. The Data Grid data type will be Account, and the Get All step from the Integration > Internal Services > Account Service component category would be used to retrieve users. Below is a downloadable example to import into Decisions.


  1. Navigate to a Designer Folder and click CREATE FLOW from the bottom action panel. Then, enter a name for the Flow and click CREATE.2018-02-05_164412.PNG
  2. Expand Integration > Internal Services > Account Service in the Steps panel, add the GetAll step.

    2019-10-09_111127.PNG

  3. On the Done outcome path add a Show Form step.

    2019-10-09_111158.PNG

  4. In the resulting Pick or Create Form dialog, name the new form "Display Accounts" and select 'Create'.

    2019-10-09_111302.PNG

  5. The first Form component for the Form is a Data Grid. In the Form Controls panel, search and drag a Data Grid component to the workspace.

    2019-10-09_111338.PNG

  6. Next, drag a Button component from the Actions category to the workspace.
  7. Set the Outcome Name to "Ok".

    2019-07-17_1421.png

  8. Next, with the grid selected, in the Properties panel, under the Input Data section, fill in Data Name with Accounts. Then in the Type selector choose Account.
  9. When the Input Data is set column Information will display in the Properties panel. Developers can remove, add, and sort the different fields in this section. Select the pencil icon to edit a column.
    Is VisibleAutomatically visible if set to true. 
    Can GroupAble to group by this field.
    Can SortAble to sort by this field.
    Sort OrderAscending or Descending order.
    Is Read OnlyWill not be able to copy/edit this field if set to true.
    WidthSet the width of the column
    Allow Text AlignmentWill display the options to align the text in the column to be left, center, or right-aligned.
  10. Click Save and then close the Form Designer to return to the Flow Designer.

    2019-10-09_111459.PNG

  11. Back in the Flow Designer, connect the Done path of the GetAll step to the Form. 
  12. With the Form selected, under Inputs > Accounts select the output from the GetAll step.
  13. Connect the Done path from the Form to the End step.

    2019-10-09_111929.PNG

    Debug

  14. Select Debug in the Top action panel.

    2019-10-09_112014.PNG

  15. When the Flow runs in the Debugger the Data Grid will show the list of accounts.2019-10-09_112046.PNG



Was this article helpful?