Skip to content

Commit

Permalink
Merge pull request #431 from gristlabs/reordering-conditional-rules-e…
Browse files Browse the repository at this point in the history
…xample

Added ex. showing how to reorder conditional rules
  • Loading branch information
jr-grist authored Oct 24, 2024
2 parents f252819 + 4c39881 commit 067d4de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions help/en/docs/conditional-formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ To add conditional formatting to rows, go to the `ROW STYLE` section of the [cre
Order of Rules
--------------

Note that Grist applies the rules in order. Styles applied by later rules will override those applied by earlier rules.
Note that Grist applies the rules in order from top to bottom. Styles applied by rules that appear later in the list will override those applied by rules earlier in the list. To change the order of the rules, hover over a rule to reveal a drag handle, then click and drag the handle to move the rule to its new position.

What would happen if we swapped the last two rules in the example above?

![Conditional rules order](images/columns/conditional-rules-order.PNG)

Notice that Gen Hamamoto, who has 0 champion dogs, is not highlighted in brown. This is because after applying the second conditional style, `$Number_of_Champions == 0`{: .formula}, Grist applied the third, `$Number_of_Champions <= 2`{: .formula}, which applies to Gen Hamamoto as well and shades him blue.
Notice that Gen Hamamoto, who has 0 champion dogs, is not highlighted in brown. This is because after applying the second conditional style, `$Number_of_Champions == 0`{: .formula}, Grist applied the third, `$Number_of_Champions <= 2`{: .formula}, which applies to Gen Hamamoto as well and shades him blue. When we change the order of the rules so that the second and third conditional styles switch positions, Gen Hamamoto will be highlighted in brown.

![Reorder conditional rules](images/columns/reorder-conditional-rules.gif)
{: .screenshot-half}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 067d4de

Please sign in to comment.