Grids: conditional formatting
Summary Conditional formatting changes how the cells of a Table grid look when they meet a rule: it can give them a background colour, show an icon in them, or turn the matched words into a link…
Check yourself
သင်၏ PaT အကောင့်ဝင်ခြင်းကို စစ်ဆေးနေသည်…
How To
ဤစာမျက်နှာတွင်
- Opening the Conditional Formatting tab
- Step 1
- Step 2
- Step 3
- Step 4
- Step 5
- Step 6
- Colouring cells from the Data Preview
- Step 1
- Step 2
- Step 3
- Step 4
- Step 5
- Step 6
- Step 7
- Step 8
- Step 9
- Adding a rule
- Step 1
- Step 2
- Step 3
- Step 4
- Step 5
- Step 6
- Step 7
- Step 8
- Step 9
- Step 10
- Rule order, switching rules off and saving
- Step 1
- Step 2
- Step 3
- Step 4
- Step 5
- Step 6
- Step 7
- Showing an icon or an image from the image library
- Step 1
- Step 2
- Step 3
- Step 4
- Step 5
- Step 6
- Step 7
- Step 8
- Step 9
- Turning the matched words into a link
- Step 1
- Step 2
- Step 3
- Step 4
- Step 5
- Flattened grids: colouring a cell by a field it does not show
- Step 1
- Step 2
- Step 3
- Step 4
- Step 5
- Step 6
- Step 7
- Step 8
- Step 9
- Step 10
- Step 11
- Purpose / Intent of the Module
- Header One
Summary Conditional formatting changes how the cells of a Table grid look when they meet a rule: it can give them a background colour, show an icon in them, or turn the matched words into a link. This lesson is for the person who builds forms or dashboards in PaT. It covers setting up rules with the Data Preview, icons from the image library, web links, and colouring a flattened grid's cells by a field they do not show.
Opening the Conditional Formatting tab
Step 1
Conditional formatting changes the cells of a Table grid that meet a rule you set: it gives them a background colour, an icon or a link. The person who builds the form or dashboard sets up the rules, and everyone who views the grid sees the result.
Step 2
To show or hide a form element depending on an earlier answer, see the lesson Conditional Formatting instead.
Step 3
In SD Form Builder or SD Dashboard, click the Table grid's Edit button, the green pencil at its top right. The Edit form field window opens.
Step 4
Click the Conditional Formatting tab, the last tab along the top of the window.
Step 5
At the top right of the tab, switch on the toggle so it reads Enabled. While it reads Disabled, the grid uses none of its rules.
Step 6
A bar below the toggle says which rules you are editing: Normal Mode for a standard grid, Transposed Mode when Transpose Data is switched on, or Flattened Mode when Flatten Data is switched on, both on the Advanced tab. A transposed grid uses its own set of rules, not the normal ones.
Colouring cells from the Data Preview
Step 1
When the grid takes its rows from an endpoint (on the General tab, Data Mode is Endpoint pulled from a data source), the tab shows a Data Preview of the grid's first 10 rows.
Step 2
If the Data Preview does not show after you choose the endpoint, click Save and Close, then open the Edit form field window again.
Step 3
To colour every cell that holds a certain value, click one such cell in the preview. A Cell Color panel opens below it, naming the column and the value, for example Status = "Done".
Step 4
A colour picked for an empty cell makes a rule with the condition Is Empty, which colours the empty cells of that column.
Step 5
Under Quick Colors, click a colour. Or type a colour code, such as #fde047, under Custom Color and click Apply.
Step 6
PaT adds a rule at the bottom of Formatting Rules: that column Equals that value, with that background colour. The preview shows the colour straight away.
Step 7
To start a rule for one column, click the column's heading in the preview. A new rule for that column opens under Formatting Rules, ready for its condition and value.
Step 8
The preview follows every change you make to the rules, so you can see what a rule does before you save it.
Step 9
A grid whose rows are typed in (Data Mode is Static - Data entered manually) has no Data Preview. Add its rules with Add Rule instead.
Adding a rule
Step 1
Click Add Rule, under Formatting Rules. A new rule opens, set to colour matching cells Light Green.
Step 2
Under Target Column, choose the column whose cells the rule checks, or leave All Columns to check every cell.
Step 3
Under Condition, choose how to compare: Equals, Not Equals, Contains, Does Not Contain, Starts With, Ends With, Is Empty, Is Not Empty, Greater Than, Less Than, Greater Than or Equal, Less Than or Equal, or Between.
Step 4
Type the value to compare with in Value. Is Empty and Is Not Empty need no value.
Step 5
For Between, type the lowest value in From Value and the highest in To Value. Both ends count as a match.
Step 6
Greater Than, Less Than and Between compare numbers: a cell that does not hold a number never matches them.
Step 7
Text comparisons ignore capitals. To match capitals exactly, switch on Case sensitive.
Step 8
Under Background Color, click a colour (point at one to see its name), or type a colour code in Custom Hex.
Step 9
Until a rule is complete, it has a red border and says what is missing, for example Comparison value is required for this condition type.
Step 10
The top line of each rule sums it up, for example Status Equals "Done", with its place in the list, such as #1. Click the line to close the rule or open it again.
Rule order, switching rules off and saving
Step 1
Rules are checked from the top of the list down. The first matching Background Colour rule gives a cell its colour, and the first matching icon or link rule gives it an icon or link, so one cell can show both.
Step 2
The Data Preview shows only the first matching rule for each cell. Check a cell with both a colour and an icon or link on the grid itself.
Step 3
To change the order, drag a rule by the handle of six dots at the left of its top line.
Step 4
To stop a rule for now without deleting it, switch off Enabled at the bottom of the rule. The rule turns pale and no longer applies.
Step 5
To delete a rule, click the red bin at the bottom right of the rule. It goes at once, without asking.
Step 6
If a rule's column is no longer in the grid, a warning sign shows on the rule's top line. Point at it to read This column is no longer available in the grid.
Step 7
Click Save and Close, at the bottom of the window, to keep your rules. Close, at the top right, leaves the grid as it was.
Showing an icon or an image from the image library
Step 1
Under Format Type, choose what a rule does to a matching cell: Background Colour, Chat Link, Icon, SD Link, Form Link or Web Link (URL).
Step 2
Chat Link, SD Link and Form Link show a chat icon, an SD link or a Form link in place of the cell's text. Pointing at it shows Open chat for, View SD for or View Form for, followed by the cell's value.
Step 3
Before you rely on these links, click one on the finished form or dashboard to check that it opens the chat, SD or form you expect.
Step 4
Choose Icon. Under Icon Settings, click one of the ready-made icons: Chat, Form or SD.
Step 5
To use a picture from the image library instead, click Select Image from Library and type part of its name. Each image shows with its name: click one to use it.
Step 6
Select Image from Library only appears when the image library has images to offer.
Step 7
To use a picture from elsewhere on the web, click Custom URL, then paste the picture's web address into Custom Icon URL.
Step 8
Type the icon's width in Icon Width, for example 24px.
Step 9
On the grid, the icon shows in the middle of the cell, in place of the cell's text. In the Data Preview, it shows small, in a cell with a dashed border.
Turning the matched words into a link
Step 1
Choose Web Link (URL) under Format Type, then type the web address the link should open in Link URL. It must start with http:// or https://.
Step 2
With Equals, Contains, Starts With or Ends With, only the matched words become the link. For example, a rule that Contains manual links just the word manual in See the manual for details.
Step 3
With any other condition, the whole cell value becomes the link.
Step 4
A person viewing the grid clicks the link, and the web address opens in a new browser tab. Every cell the rule matches links to the same address.
Step 5
In the Data Preview, the linked words are underlined in blue.
Flattened grids: colouring a cell by a field it does not show
Step 1
A flattened grid has Flatten Data switched on, on the Advanced tab. Each cell shows one value, from the Cell Value Field of the record at that row and column, and the record's other fields are not shown.
Step 2
To colour cells by one of those other fields, open the Advanced tab and choose the field in Fields Available to Formatting. You can choose more than one.
Step 3
Open the Conditional Formatting tab. A flattened grid has its own rules, so the list starts empty. Until you add one, the grid keeps using its normal rules; once you add one, only the flattened grid's own rules apply.
Step 4
The bar at the top of the tab says Flattened Mode on a flattened grid, and the rules listed are the flattened grid's own.
Step 5
Click Add Rule. In place of Target Column, the rule now has Colour the cell based on.
Step 6
In Colour the cell based on, choose the field to test. The rule then tests that field in the record behind each cell, on every cell of the grid. Leave it on What the cell itself shows to test the value the cell displays.
Step 7
Set the Condition, the Value and the colour as for any rule. With Equals and Not Equals, these fields compare numbers as numbers, so 1.00 matches a field that holds 1.
Step 8
A position where nothing has been recorded reads blank for every field. A rule that uses Is Empty colours those positions, so you can see what has not been recorded yet.
Step 9
For example, on a stocktake grid with aisles as rows and bays as columns, each cell shows a count. Choose Status in Fields Available to Formatting, then add a rule based on Status that Equals Over, coloured Red.
Step 10
If no field is chosen in Fields Available to Formatting, each rule shows Target Column instead, which lists the flattened grid's own columns, such as the column that names the rows and each column heading.
Step 11
Build rules based on Fields Available to Formatting with Add Rule, and check their colours on the grid itself.
Purpose / Intent of the Module
A brief description of what this module is about
Header One
Rate this page
Checking your PaT sign-in…