Data grid
This guide will take you through how to set up a data grid.
Last updated
This guide will take you through how to set up a data grid.
Last updated
No connectors will be used in this example, but data from table steps will be utilized. Please download the file below; it will be used to import into the required table steps
Open an existing or create a new one in an and open it in the Designer.
Add a User step.
Add a Table step.
Open the Table step and select Import File.
Choose the semicolon separator and click OK.
Select the "Data grid.csv" file downloaded in the prerequisite section above.
Set the table variable name to "Articles" and click OK.
Change the step name to "Articles". It's good practice to name steps after their content.
Right-click on the "Articles" step, select Add data arrow, and connect it to the User step created in step 1.
Open the User step.
Add a Data Grid.
In the Prompt, write "Choose an article".
In the Source, choose the table "Articles".
In the Columns, choose "Edit" to the far right.
Choose "Add All Columns".
Article column:
Check the Hidden checkbox.
Name column:
Set the Size to Medium.
In the Cell Color, write "{"GREEN"}".
Description column:
Set the Size Mode to Break.
Cost column:
Edit the Show as to Numeric.
Discount column:
Edit the Show as to Numeric.
Check the Editable-checkbox.
Add a new column, by pressing the + button in the top right corner.
Set Show as to Computed.
Check the Include in Output-checkbox.
Set the Variable to "TotalPrice".
In the Value Template, write "{isNull(Cost,0) - isNull(Discount,0)}"
Flow engine cannot promise that the Qty-variable is not null. And you cannot multiply with nothing. By adding isNull, we tell the Flow engine what to do if it would be a null value.
Set the Title to "Discounted price".
Set the Cell Color to "{"#8cd3ff"}".
Click OK to go back.
Check the Allow add checkbox.
Check the Allow Delete checkbox.
Set the Row Selection Mode to Single Selection.
Under Output, in Target Variable, write "chosenArticle".
Click the Play button in the top right-hand corner to run the application in diagnostic mode.
When working with tables, connect offers a variety of possibilities to add configuration and style to make it look more suiting for your purpose.
Go back to the Designer.
Remove the cell colors from the Name and Total price columns.
Under Appearance, change the Row Height to small.
In the Item Style, open the editor by clicking the arrows to the far right.
Add the code below.
Run the application in diagnostic mode again.
Condition to hide
In the Condition To Hide, write “{userId = “your user id”} (the user Id you log in to Connect with)
Run the application in diagnostic mode again.