A GridField is a matrix of DataSets and Fields (Rows and Columns). In contrast to a ListField, each cell has a unique ID that can be used in expressions/formula elsewhere in the application. This Field type will NOT follow the principles of ‘responsive design’ but will show a horizontal scroll bar at the bottom of the grid. Common uses of a grid field are for financial tables and milestone tables.
When creating a grid field a key point to remember is that the label isn't shown in the workspace, but is still useful to have if you want to search for it in your fields. Another point is that when choosing your identifier its best not to make it too long because if you want to reference an individual cell in an expression it will be will make it longer and harder to understand (especially if its a long expression).
Orientation determines the way data sets and fields are laid out as rows or columns. Orientation is not permanently set so can be changed after the field is created.
Vertical means that fields are horizontal (Rows) and datasets are vertical (Columns):
Horizontal means that data sets are horizontal (Rows) and fields are vertical (Columns):
Hide grid row titles means that whatever is entered into the label for the field or dataset (depending or orientation) will be hidden. This can be used to increase the horizontal visibility of the grid field seen on screen
With row titles:
Hidden row titles:
For each Field in an App, you can set a property on the Field to 'Exclude This Field From Templated Record Copies' If this has been set for the certain Fields and you choose to use a Templated Copy, it will not copy the values from these Fields when it copies the Record.
Datasets are quite simple, a field determines what type of cell a row/column will be while a dataset determines how many there will be. For the example above (horizontal Grid field) a dataset is a row and each row represents a checklist item, the more datasets the more checklist items. The label would show alongside each checklist item, for example, dataset 3 could be 'Train Personal'. In the example above they have been named as sections 1, 2, 3... This because it has been chosen to hide the labels and have the checklist item entered into a text box as it has better visibility.
The identifier works as normal but it can be auto-filled in based on the label like individual field identifiers.
Tip - Again try and keep the identifier small so the cell identifier isn't too large
The display order determines the order of which datasets are displayed. If vertical orientation the lower the number the closer to the left and if horizontal the lower the higher up it is
Tip - When setting display order, do it in increments of 10, this way if you want to change the order you can slot it between the datasets easier without having to reorder all the others
Note - Datasets can only be added and removed in the appstudio field, they can not be added in the workspace as a checklist can.
Fields are a bit more complicated but work very similar to creating an individual field. The label and identifier work the same as they do on datasets. The type of field is limited more than creating an individual field, current fields that are suitable for use are:
- Long Text
- Url Field
- Person by Team
- Muilti state
- Image List
- Date Time
After this, it shares the same principles of adding a new standalone field - https://support.softools.net/hc/en-gb/articles/210548806-Adding-and-Editing-Fields
In a grid field, you can set expressions in each cell of a grid field so if there are 5 datasets and 4 fields there will be 20 cells. This is located at the bottom of the field. These expressions work the same as they do in individual fields - https://support.softools.net/hc/en-gb/sections/115000703732-Expressions
Header Text is a box at the bottom of a dataset or a field (which ever represents the row on the grid). When you enter a value into the header text it will appear above the row, for example, 'Not Required.
If horizontal orientation it can be found in the dataset:
If Vertical orientation it can be found in the field:
When referencing a grid field cell in an expression it comes in the format of [GridIdentifier_DatasetIdenifier_FieldIdentifier] so making the identifier standard and easy to read will help with future use of the grid
Tip - To find the identifier of a cell quicker you can right click the cell and click inspect to bring up the source, this will show you the identifier of the cell
- When creating a grid that is mostly made of expressions its best to put the expression in sets of 5 or 4, then saving and repeating this process. If you put them all in in one go and there is an error it can take a long time to find the error
- If you're creating a checklist, milestone tracker or similar grid fields its better to use a standard identifier like 'I01' for item 1 or 'S01' for stage 1 instead of something like 'TrainPersonal' or 'Definestage' as its easier to reference and if you change the field you don't need to change the identifier
- A common issue when trying to save a field and it failing is that the dataset and field identifiers aren't valid i.e. there is a space or invalid character.
- If you are going to use this grid on a mobile or tablet its best to test it first because screen sizing can have a big impact usability
- If you're making a big checklist that is going to be filled in over a long period of time, instead of separating out large sections using a header it can be better to make them in different grid fields as its easier to reference each section/stage and you can put them in separate templates, this means you don't have to see the parts of the checklist that isn't relevant