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/logic-apps/workflow-definition-language-functions-reference.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,7 @@ String functions work only on strings.
104
104
| --------------- | ---- |
105
105
|[concat](../logic-apps/workflow-definition-language-functions-reference.md#concat)| Combine two or more strings, and return the combined string. |
106
106
|[endsWith](../logic-apps/workflow-definition-language-functions-reference.md#endswith)| Check whether a string ends with the specified substring. |
107
+
|[formatNumber](../logic-apps/workflow-definition-language-functions-reference.md#formatNumber)| Return a number as a string based on the specified format |
107
108
|[guid](../logic-apps/workflow-definition-language-functions-reference.md#guid)| Generate a globally unique identifier (GUID) as a string. |
108
109
|[indexOf](../logic-apps/workflow-definition-language-functions-reference.md#indexof)| Return the starting position for a substring. |
109
110
|[lastIndexOf](../logic-apps/workflow-definition-language-functions-reference.md#lastindexof)| Return the starting position for the last occurrence of a substring. |
And returns the subject text as a string, for example: `"Hello world"`
2086
2087
2088
+
<aname="formatNumber"></a>
2089
+
2090
+
### formatNumber
2091
+
2092
+
Return a number as a string that's based on the specified format.
2093
+
2094
+
```text
2095
+
formatNumber(<number>, <format>, <locale>?)
2096
+
```
2097
+
2098
+
| Parameter | Required | Type | Description |
2099
+
| --------- | -------- | ---- | ----------- |
2100
+
| <*number*> | Yes | Integer or Double | The value that you want to format. |
2101
+
| <*format*> | Yes | String | A composite format string that specifies the format that you want to use. For the supported numeric format strings, see [Standard numeric format strings](https://docs.microsoft.com/dotnet/standard/base-types/standard-numeric-format-strings), which are supported by `number.ToString(<format>, <locale>)`. |
2102
+
| <*locale*> | No | String | The locale to use as supported by `number.ToString(<format>, <locale>)`. If not specified, the default value is `en-us`. |
2103
+
|||||
2104
+
2105
+
| Return value | Type | Description |
2106
+
| ------------ | ---- | ----------- |
2107
+
| <*formatted-number*> | String | The specified number as a string in the format that you specified. You can cast this return value to an `int` or `float`. |
2108
+
||||
2109
+
2110
+
*Example 1*
2111
+
2112
+
Suppose that you want to format the number `1234567890`. This example formats that number as the string "1,234,567,890.00".
2113
+
2114
+
```
2115
+
formatNumber(1234567890, "{0:0,0.00}", "en-us")
2116
+
```
2117
+
2118
+
*Example 2"
2119
+
2120
+
Suppose that you want to format the number `1234567890`. This example formats the number to the string "1.234.567.890,00".
2121
+
2122
+
```
2123
+
formatNumber(1234567890, "{0:0,0.00}", "is-is")
2124
+
```
2125
+
2126
+
*Example 3*
2127
+
2128
+
Suppose that you want to format the number `17.35`. This example formats the number to the string "$17.35".
2129
+
2130
+
```
2131
+
formatNumber(17.36, "{0:C2}")
2132
+
```
2133
+
2134
+
*Example 4*
2135
+
2136
+
Suppose that you want to format the number `17.35`. This example formats the number to the string "17,35 kr".
0 commit comments