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: powerapps-docs/maker/canvas-apps/functions/data-types.md
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -92,13 +92,13 @@ When you save a media data type, such as an image, to a database, the app sends
92
92
93
93
### Size limits
94
94
95
-
As text string and URIs, these data types have no preset limit on their length.
95
+
As text strings and URIs, these data types have no preset limit on their length.
96
96
97
-
The binary data that these data types reference also has no preset limit on size. For example an image captured through the camera control that is now referenced as **"appres://..."** can be as large and high resolution as the camera can muster. The resolution, frame rate, and other attributes of media files are not limited by the data type, but specific controls for playing and capturing media may have their own limitations.
97
+
The binary data that these data types reference also has no preset limit on size. For example, an image captured through the camera control that's now referenced as **"appres://..."** can be as large and high resolution as the device's camera can muster. The resolution, frame rate, and other attributes of media files aren't limited by the data type, but specific controls for playing and capturing media may have their own limitations.
98
98
99
-
However, all data sizes are subject to the amount of available memory in the app. Typically browsers running on a desktop computer will support more than 100 megabyteas of data. However, the amount of available memory on a device such as a phone may be far lower, typically in the range 30-70 megabytes. To determine whether your app will run within these limits, test common scenarios on all devices on which it should run.
99
+
However, all data sizes are subject to the amount of available memory in the app. Browsers running on a desktop computer typically support more than 100 megabytes of data. However, the amount of available memory on a device such as a phone might be far lower, typically in the range 30-70 megabytes. To determine whether your app will run within these limits, test common scenarios on all devices on which it should run.
100
100
101
-
It is a best practice to only hold data in memory as long as you need to. Upload images to a database as soon as you can; download images only when requested by the app's user.
101
+
As a best practice, hold data in memory only as long as necessary. Upload images to a database as soon as you can; download images only when the app's user requests them.
102
102
103
103
## Number and Currency
104
104
@@ -121,7 +121,7 @@ Date/time values fall in these categories:
121
121
122
122
This table shows some examples:
123
123
124
-
| Date/time type | Value stored in the database | Value displayed and entered 7 hours west of UTC | Value displayed and entered 4 hours east of UTC |
124
+
| Date/time type | Value stored in the database | Value displayed and entered 7 hours west of UTC | Value displayed and entered 4 hours east of UTC |
|**User local**| Sunday, May 19, 2019<br>4:00 AM | Saturday, May 18, 2019<br>9:00 PM | Sunday, May 19, 2019<br>8:00 AM |
127
127
|**Time zone independent**| Sunday, May 19, 2019<br>4:00 AM | Sunday, May 19, 2019<br>4:00 AM | Sunday, May 19, 2019<br>4:00 AM |
@@ -153,9 +153,11 @@ For example, Unix time shows September 9, 2001, at 01:46:40 UTC as 1,000,000,000
153
153
154
154
However, that function returns **Saturday, September 8, 2001 18:46:40** if you use the **DateTimeFormat.LongDateTime24** format in a time zone that's -7 hours offset from UTC (7 hours west of UTC). This result shows the **DateTime** value correctly based on the local time zone.
155
155
156
-
To convert to a Unix time, take the result from **Value** and divide by 1,000: **RoundDown( Value( UnixTime ) / 1000, 0 )**.
156
+
To convert to a Unix time, divide the result from **Value** by 1,000:
157
+
<br>**RoundDown( Value( UnixTime ) / 1000, 0 )**
157
158
158
-
If you need the Unix time in a Date value for further calculations or display within PowerApps, use the formula **DateAdd( Date( 1970,1,1 ), UnixTime, Seconds )**.
159
+
If you need the Unix time in a **Date** value for further calculations or display within PowerApps, use this formula:
Copy file name to clipboardExpand all lines: powerapps-docs/maker/canvas-apps/functions/function-concatenate.md
+49-42Lines changed: 49 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -15,94 +15,101 @@ search.app:
15
15
- PowerApps
16
16
---
17
17
# Concat and Concatenate functions in PowerApps
18
+
18
19
Concatenates individual strings of text and strings in [tables](../working-with-tables.md).
19
20
20
21
## Description
21
22
22
-
The **Concatenate** function concatenates a mix of individual strings and a single-column table of strings. Used with individual strings, this function is equivalent to using the **&**[operator](operators.md).
23
+
The **Concatenate** function concatenates a mix of individual strings and a single-column table of strings. When you use this function with individual strings, it's equivalent to using the **&**[operator](operators.md).
23
24
24
25
The **Concat** function concatenates the result of a formula applied across all the [records](../working-with-tables.md#records) of a table, resulting in a single string. Use this function to summarize the strings of a table, just as the **[Sum](function-aggregates.md)** function does for numbers.
-**Products** = 
49
+
50
+
To create these global variables in an app, insert a [**Button**](../controls/control-button.md) control, and set its **OnSelect** property to this formula:
47
51
48
-
To create these global variables in an app, insert a button control and set its **OnSelect** property to
49
52
```powerapps-dot
50
-
Set( FirstName, "Jane" ); Set( LastName, "Doe" );
51
-
Set( Products,
52
-
Table(
53
-
{ Name: "Violin", Type: "String" },
53
+
Set( FirstName, "Jane" ); Set( LastName, "Doe" );
54
+
Set( Products,
55
+
Table(
56
+
{ Name: "Violin", Type: "String" },
54
57
{ Name: "Cello", Type: "String" },
55
-
{ Name: "Trumpet", Type: "Wind" }
56
-
)
58
+
{ Name: "Trumpet", Type: "Wind" }
59
+
)
57
60
)
58
61
```
59
-
Select the button (hold down the Alt key while clicking the button).
60
62
61
-
### Concatenante function and & operator
63
+
Select the button (by clicking it while you hold down the Alt key).
64
+
65
+
### Concatenate function and the & operator
62
66
63
-
| Formula | Description | Result |
67
+
For these examples, set the **Text** property of a [**Label**](../controls/control-text-box.md) control to a formula from the first column of the next table.
68
+
69
+
| Formula | Description | Result |
64
70
|---------|-------------|--------|
65
71
|**Concatenate( LastName, ", ", FirstName )**| Concatenates the value in **LastName**, the string **", "** (a comma followed by a space), and the value in **FirstName**. | "Doe, Jane" |
66
-
|**LastName & ", " & FirstName**| Same as the previous example, using the **&** operator instead of the function. | "Doe, Jane" |
72
+
|**LastName & ", " & FirstName**| Same as the previous example except using the **&** operator instead of the function. | "Doe, Jane" |
67
73
|**Concatenate( FirstName, " ", LastName )**| Concatenates the value in **FirstName**, the string **" "** (a single space), and the value in **LastName**. | "Jane Doe" |
68
74
|**FirstName & " " & LastName**| Same as the previous example, using the **&** operator instead of the function. | "Jane Doe" |
69
75
70
-
### Concatenate with single column table
76
+
### Concatenate with a single-column table
77
+
78
+
For this example, add a blank, vertical [**Gallery**](../controls/control-gallery.md) control, set its **Items** property to the formula in the next table, and then add a label in the gallery template.
71
79
72
-
| Formula | Description | Result |
80
+
| Formula | Description | Result |
73
81
|---------|-------------|--------|
74
-
|**Concatenate( "Name: ", Products.Name, ", Type: ", Products.Type )**| For each record in the **Products** table, concatenates the string **"Name: "**, the name of the product, the string **", Type: "** and the type of the product. ||
82
+
|**Concatenate( "Name: ", Products.Name, ", Type: ", Products.Type )**| For each record in the **Products** table, concatenates the string **"Name: "**, the name of the product, the string **", Type: "** and the type of the product. ||
75
83
76
84
### Concat function
77
85
78
-
| Formula | Description | Result |
86
+
For these examples, set the **Text** property of a label to a formula from the first column of the next table.
87
+
88
+
| Formula | Description | Result |
79
89
|---------|-------------|--------|
80
-
|**Concat( Products, Name & ", " )**| Evaluates the formula**Name & ", "** for each record of **Products** and concatenates the results together into a single text string. | "Violin, Cello, Trumpet, " |
81
-
|**Concat( Filter( Products, Type = "String" ), Name & ", " )**| Evaluates the formula **Name & ", "** for each record of **Products** that satifies the filter **Type = "String"** and concatenates the results together into a single text string. | "Violin, Cello, " |
90
+
|**Concat( Products, Name & ", " )**| Evaluates the expression**Name & ", "** for each record of **Products** and concatenates the results together into a single text string. | "Violin, Cello, Trumpet, " |
91
+
|**Concat( Filter( Products, Type = "String" ), Name & ", " )**| Evaluates the formula **Name & ", "** for each record of **Products** that satisfies the filter **Type = "String"**, and concatenates the results into a single text string. | "Violin, Cello, " |
82
92
83
93
### Trimming the end
84
94
85
-
Note that in the last two example an extra ", " is included at the end of the result. This is because for each record of the table the function extracts the **Name** and adds a ", " to the end, no matter if it is the first record or the last.
86
-
87
-
In some cases these extra characters won't matter, for example if a single space separator is used and the result is displayed in a label. For situations where these extra characters needs to be removed, you can use the [**Left** function](function-left-mid-right.md) or the [**Match** function](function-ismatch.md):
95
+
The last two examples include an extra ", " at the end of the result. The function appends a comma and a space to the **Name** value of every record in the table, including the last record.
88
96
89
-
| Formula | Description | Result |
90
-
|---------|-------------|--------|
91
-
|**Left( Concat( Products, Name & ", " ), Len( Concat( Products, Name & ", " ) ) - 2 )**| Returns the result of **Concat** but removes the last two characters, the extra separator that is not desired. | "Violin, Cello, Trumpet" |
92
-
|**Match( Concat( Products, Name & ", " ), "^(?<trim>.*), $" ).trim**| Returns the characters of **Concat** from the beginning of the text string (^) to the end ($) but does not include the unwanted comma and space at the end. | "Violin, Cello, Trumpet" |
93
-
94
-
### Split and MatchAll
97
+
In some cases, these extra characters don't matter. For example, a single-space separator doesn't appear if you show the result in a label. If you want to remove these extra characters, use the [**Left**](function-left-mid-right.md) or [**Match**](function-ismatch.md) function.
95
98
96
-
The **Split** and **MatchAll**functions can be used to reverse **Concat** when used with a separator.
99
+
For these examples, set the **Text**property of a label to a formula from the first column of the next table.
97
100
98
-
| Formula | Description | Result |
101
+
| Formula | Description | Result |
99
102
|---------|-------------|--------|
100
-
|**Split( Concat( Products, Name & ", " ), ", " )**| Splits the text string with the separator **", "**. Since there is a comma and space at the end of the string, this becomes an extra row in the result with an empty string. ||
101
-
| **MatchAll( Concat( Products, Name & ", " ), "[^\s,]+" ).FullMatch** | Splits the text string based on characters that are not a space or a comma. In this case, the extra comma and space at the end of the string is automatically removed. | 
102
-
103
-
104
-
103
+
|**Left( Concat( Products, Name & ", " ), Len( Concat( Products, Name & ", " ) ) - 2 )**| Returns the result of **Concat** but removes the last two characters, which form the extraneous separator. | "Violin, Cello, Trumpet" |
104
+
|**Match( Concat( Products, Name & ", " ), "^(?<trim>.*), $" ).trim**| Returns the characters of **Concat** from the beginning of the text string (^) to the end ($) but doesn't include the unwanted comma and space at the end. | "Violin, Cello, Trumpet" |
105
105
106
+
### Split and MatchAll
106
107
108
+
If you used **Concat** with a separator, you can reverse the operation by combining the **Split** and **MatchAll** functions.
107
109
110
+
For these examples, add a blank, vertical gallery, set its **Items** property to a formula in the next table, and then add a label in the gallery template.
108
111
112
+
| Formula | Description | Result |
113
+
|---------|-------------|--------|
114
+
|**Split( Concat( Products, Name & ", " ), ", " )**| Splits the text string with the separator **", "**. The string ends with a comma and space, so the last row in the result is an empty string. ||
115
+
| **MatchAll( Concat( Products, Name & ", " ), "[^\s,]+" ).FullMatch** | Splits the text string based on characters that aren't spaces or commas. This formula removes the extra comma and space at the end of the string. | 
0 commit comments