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: articles/azure-resource-manager/templates/template-functions-comparison.md
+76Lines changed: 76 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,88 @@ ms.date: 04/27/2020
8
8
9
9
Resource Manager provides several functions for making comparisons in your Azure Resource Manager (ARM) templates.
10
10
11
+
*[coalesce](#coalesce)
11
12
*[equals](#equals)
12
13
*[greater](#greater)
13
14
*[greaterOrEquals](#greaterorequals)
14
15
*[less](#less)
15
16
*[lessOrEquals](#lessorequals)
16
17
18
+
## coalesce
19
+
20
+
`coalesce(arg1, arg2, arg3, ...)`
21
+
22
+
Returns first non-null value from the parameters. Empty strings, empty arrays, and empty objects are not null.
23
+
24
+
### Parameters
25
+
26
+
| Parameter | Required | Type | Description |
27
+
|:--- |:--- |:--- |:--- |
28
+
| arg1 |Yes |int, string, array, or object |The first value to test for null. |
29
+
| additional args |No |int, string, array, or object |Additional values to test for null. |
30
+
31
+
### Return value
32
+
33
+
The value of the first non-null parameters, which can be a string, int, array, or object. Null if all parameters are null.
34
+
35
+
### Example
36
+
37
+
The following [example template](https://github.com/Azure/azure-docs-json-samples/blob/master/azure-resource-manager/functions/coalesce.json) shows the output from different uses of coalesce.
0 commit comments