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
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1171,6 +1171,13 @@ Operators specify the type of operation to perform. The following operators are
1171
1171
- length
1172
1172
- abs
1173
1173
- loopIndex
1174
+
- floor
1175
+
- ceiling
1176
+
- pow
1177
+
- substring
1178
+
- getDate
1179
+
- getMonth
1180
+
- getYear
1174
1181
1175
1182
**Binary arthmetic operators** - The following are the standard arithmetic binary operators that expect two operands:
1176
1183
@@ -1224,6 +1231,21 @@ Operators specify the type of operation to perform. The following operators are
1224
1231
-`"txtContent":"=length(45)"` results in _1_
1225
1232
-`"txtContent":"=length(0)"` results in _0_
1226
1233
1234
+
-**floor**: returns the largest integer les than or equal to a given number. - _Only available in SharePoint Online_
1235
+
-`"txtContent":"=floor(45.5)"` results in _45_
1236
+
1237
+
-**ceiling**: rounds the given number up to the next largest whole number or integer. - _Only available in SharePoint Online_
1238
+
-`"txtContent":"=ceiling(45.5)"` results in _46_
1239
+
1240
+
-**getDate**: returns the day of the month of the given date. - _Only available in SharePoint Online_
1241
+
-`"txtContent":"=getDate(Date('12/26/1981'))"` results in _26_
1242
+
1243
+
-**getMonth**: returns the month in the specified date according to local time, as a zero-based value (where zero indicates the first month of the year). - _Only available in SharePoint Online_
1244
+
-`"txtContent":"=getMonth(Date('12/26/1981'))"` results in _11_
1245
+
1246
+
-**getYear**: returns the year of the given date. - _Only available in SharePoint Online_
1247
+
-`"txtContent":"=getYear(Date('12/26/1981'))"` results in _1981_
1248
+
1227
1249
**Binary operators** - The following are operators that expect two operands:
1228
1250
1229
1251
-**indexOf**: takes 2 operands. The first is the text you would like to search within, the second is the text you would like to search for. Returns the index value of the first occurence of the search term within the string. Indexes start at 0. If the search term is not found within the text, -1 is returned. This operator is case-sensitive. - _Only available in SharePoint Online_
@@ -1235,7 +1257,22 @@ Operators specify the type of operation to perform. The following operators are
1235
1257
-**join**: takes 2 operands. The first is an array (multi-select person or choice field) and the second is the separating string. Returns a string concatenation of the array values separated by the separating string. - _Only available in SharePoint Online_
1236
1258
-`"txtContent": "=join(@currentField, ', ')"` might result in _"Apple, Orange, Cherry"_ (depending on the selected values)
1237
1259
-`"txtContent": "=join(@currentField.title, '|')"` might result in _"Chris Kent|Vesa Juvonen|Jeff Teper"_ (depending on the selected persons)
1260
+
1261
+
-**pow**: returns the base to the exponent power. - _Only available in SharePoint Online_
1262
+
-`"txtContent":"=pow(2,3)"` results in _8_
1238
1263
1264
+
**Ternary operators** - The following are operators that expect three operands:
1265
+
1266
+
-**subString**: returns the part of the string between the start and end indicies. - _Only available in SharePoint Online_
1267
+
-`"txtContent":"=subString('DogFood', 3, 4)"` results in _Fo_
1268
+
-`"txtContent":"=subString('DogFood', 4, 3)"` results in _Fo_
1269
+
-`"txtContent":"=subString('DogFood', 3, 6)"` results in _Food_
1270
+
-`"txtContent":"=subString('DogFood', 6, 3)"` results in _Food_
1271
+
1272
+
The substring() method returns the part of the string between the start and end indexes, or to the end of the string.
1273
+
1274
+
1275
+
1239
1276
**Conditional operator** - The conditional operator is:
1240
1277
1241
1278
-**?**: Conditional operations written in Abstract Tree Syntax use `?` as the operator. 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. For Excel style expressions you write these with an `if` statement. Regardless, there are 3 operands. The first is the condition to evaluate. The second is the result when the condition is true. The third is the result when the condition is false.
0 commit comments