You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/declarative-customization/column-formatting.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -74,8 +74,8 @@ The following image shows an example of conditional formatting applied to a numb
74
74
75
75

76
76
77
-
This example customizes a number field to color that field red when its value less than 70. This example adds a style attribute to the parent `<div />` element, specifies a CSS class (`sp-field-severity--warning`) to apply to that item if the value inside the field is less than 70, and specifies no color if the value is outside that range (in which case it will use the default color for values in that list view).
78
-
Note: this example uses a binary operation with the less than operator, "<", nested inside the conditional operation indicated by the operator, "?". Another description of the section in the following example is: If @currentField < 70 Then class = sp-field-severity--warning.
77
+
This example customizes a number field to color that field yellow when its value is 70 or less. This example adds a style attribute to the parent `<div />` element, specifies a CSS class (`sp-field-severity--warning`) to apply to that item if the value inside the field is less than or equal to 70, and specifies no color if the value is outside that range (in which case it will use the default color for values in that list view).
78
+
Note: this example uses a binary operation with the less than operator, "<", nested inside the conditional operation indicated by the operator, "?". Another description of the section in the following example is: If @currentField <= 70 Then class = sp-field-severity--warning.
79
79
80
80
```JSON
81
81
{
@@ -86,7 +86,7 @@ Note: this example uses a binary operation with the less than operator, "<", nes
86
86
"operator": "?",
87
87
"operands": [
88
88
{
89
-
"operator": "<",
89
+
"operator": "<=",
90
90
"operands": [
91
91
"@currentField",
92
92
70
@@ -901,7 +901,7 @@ Operators specify the type of operation to perform. The following operators are
901
901
- Date()
902
902
- cos
903
903
- sin
904
-
-:
904
+
-?
905
905
906
906
**Binary operators** - The following are the standard arithmetic binary operators that expect two operands:
907
907
@@ -924,7 +924,7 @@ Operators specify the type of operation to perform. The following operators are
924
924
925
925
**Conditional operator** - The conditional operator is:
926
926
927
-
-:
927
+
-?
928
928
929
929
This is to achieve an expression equivalent to a ? b : c, where if the expression a evaluates to true, then the result is b, else the result is c.
0 commit comments