Skip to content

Commit d1e433e

Browse files
committed
reviewed updates in three topics
1 parent 3310b1f commit d1e433e

File tree

3 files changed

+87
-75
lines changed

3 files changed

+87
-75
lines changed

powerapps-docs/maker/canvas-apps/functions/data-types.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ When you save a media data type, such as an image, to a database, the app sends
9292

9393
### Size limits
9494

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.
9696

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.
9898

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.
100100

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.
102102

103103
## Number and Currency
104104

@@ -121,7 +121,7 @@ Date/time values fall in these categories:
121121

122122
This table shows some examples:
123123

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 |
125125
|--------------------------|------------------------------|------------------------------|
126126
| **User local** | Sunday,&nbsp;May&nbsp;19,&nbsp;2019<br>4:00 AM | Saturday,&nbsp;May&nbsp;18,&nbsp;2019<br>9:00 PM | Sunday,&nbsp;May&nbsp;19,&nbsp;2019<br>8:00 AM |
127127
| **Time zone independent** | Sunday,&nbsp;May&nbsp;19,&nbsp;2019<br>4:00 AM | Sunday,&nbsp;May&nbsp;19,&nbsp;2019<br>4:00 AM | Sunday,&nbsp;May&nbsp;19,&nbsp;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
153153

154154
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.
155155

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 )**
157158

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:
160+
<br>**DateAdd( Date( 1970,1,1 ), UnixTime, Seconds )**
159161

160162
### SQL Server
161163

powerapps-docs/maker/canvas-apps/functions/function-concatenate.md

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,94 +15,101 @@ search.app:
1515
- PowerApps
1616
---
1717
# Concat and Concatenate functions in PowerApps
18+
1819
Concatenates individual strings of text and strings in [tables](../working-with-tables.md).
1920

2021
## Description
2122

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).
2324

2425
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.
2526

2627
[!INCLUDE [record-scope](../../../includes/record-scope.md)]
2728

28-
Use the [**Split** function](function-split.md) or [**MatchAll** function](function-ismatch.md) to split a string into a table of substrings.
29+
Use the [**Split**](function-split.md) or [**MatchAll**](function-ismatch.md) function to split a string into a table of substrings.
2930

3031
## Syntax
32+
3133
**Concat**( *Table*, *Formula* )
3234

33-
* *Table* - Required. Table to operate on.
34-
* *Formula* - Required. Formula to apply across the records of the table.
35+
- *Table* - Required. Table to operate on.
36+
- *Formula* - Required. Formula to apply across the records of the table.
3537

3638
**Concatenate**( *String1* [, *String2*, ...] )
3739

38-
* *String(s)* - Required. Mix of individual strings or a single-column table of strings.
40+
- *String(s)* - Required. Mix of individual strings or a single-column table of strings.
3941

4042
## Examples
4143

42-
The examples in this section use the following global variables:
44+
The examples in this section use these global variables:
4345

44-
- **FirstName** = "Jane"
45-
- **LastName** = "Doe"
46-
- **Products** = ![](media/function-concatenate/products.png)
46+
- **FirstName** = "Jane"
47+
- **LastName** = "Doe"
48+
- **Products** = ![Table with two columns and four rows](media/function-concatenate/products.png)
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:
4751

48-
To create these global variables in an app, insert a button control and set its **OnSelect** property to
4952
```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" },
5457
{ Name: "Cello", Type: "String" },
55-
{ Name: "Trumpet", Type: "Wind" }
56-
)
58+
{ Name: "Trumpet", Type: "Wind" }
59+
)
5760
)
5861
```
59-
Select the button (hold down the Alt key while clicking the button).
6062

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
6266

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 |
6470
|---------|-------------|--------|
6571
| **Concatenate(&nbsp;LastName,&nbsp;",&nbsp;",&nbsp;FirstName&nbsp;)** | Concatenates the value in **LastName**, the string **", "** (a comma followed by a space), and the value in **FirstName**. | "Doe,&nbsp;Jane" |
66-
| **LastName&nbsp;&&nbsp;",&nbsp;"&nbsp;&&nbsp;FirstName** | Same as the previous example, using the **&** operator instead of the function. | "Doe,&nbsp;Jane" |
72+
| **LastName&nbsp;&&nbsp;",&nbsp;"&nbsp;&&nbsp;FirstName** | Same as the previous example except using the **&** operator instead of the function. | "Doe,&nbsp;Jane" |
6773
| **Concatenate(&nbsp;FirstName,&nbsp;"&nbsp;",&nbsp;LastName&nbsp;)** | Concatenates the value in **FirstName**, the string **" "** (a single space), and the value in **LastName**. | "Jane&nbsp;Doe" |
6874
| **FirstName&nbsp;&&nbsp;"&nbsp;"&nbsp;&&nbsp;LastName** | Same as the previous example, using the **&** operator instead of the function. | "Jane&nbsp;Doe" |
6975

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.
7179

72-
| Formula | Description | Result |
80+
| Formula | Description | Result |
7381
|---------|-------------|--------|
74-
| **Concatenate( "Name:&nbsp;",&nbsp;Products.Name, ",&nbsp;Type:&nbsp;",&nbsp;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. | ![](media/function-concatenate/single-column.png) |
82+
| **Concatenate( "Name:&nbsp;",&nbsp;Products.Name, ",&nbsp;Type:&nbsp;",&nbsp;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. | ![Table of products](media/function-concatenate/single-column.png) |
7583

7684
### Concat function
7785

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 |
7989
|---------|-------------|--------|
80-
| **Concat( Products, Name & ", " )** | Evaluates the formula **Name & ", "** for each record of **Products** and concatenates the results together into a single text string. | "Violin,&nbsp;Cello,&nbsp;Trumpet,&nbsp;" |
81-
| **Concat( Filter(&nbsp;Products,&nbsp;Type&nbsp;=&nbsp;"String"&nbsp;), 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,&nbsp;Cello,&nbsp;" |
90+
| **Concat( Products, Name & ", " )** | Evaluates the expression **Name & ", "** for each record of **Products** and concatenates the results together into a single text string. | "Violin,&nbsp;Cello,&nbsp;Trumpet,&nbsp;" |
91+
| **Concat( Filter(&nbsp;Products,&nbsp;Type&nbsp;=&nbsp;"String"&nbsp;), 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,&nbsp;Cello,&nbsp;" |
8292

8393
### Trimming the end
8494

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.
8896

89-
| Formula | Description | Result |
90-
|---------|-------------|--------|
91-
| **Left( Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;), Len(&nbsp;Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;)&nbsp;)&nbsp;-&nbsp;2 )** | Returns the result of **Concat** but removes the last two characters, the extra separator that is not desired. | "Violin,&nbsp;Cello,&nbsp;Trumpet" |
92-
| **Match( Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;), "^(?&lt;trim&gt;.*),&nbsp;$" ).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,&nbsp;Cello,&nbsp;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.
9598

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.
97100

98-
| Formula | Description | Result |
101+
| Formula | Description | Result |
99102
|---------|-------------|--------|
100-
| **Split( Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;), ", " )** | 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. | ![](media/function-concatenate/split.png) |
101-
| **MatchAll( Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;), "[^\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. | ![](media/function-concatenate/matchall.png)
102-
103-
104-
103+
| **Left( Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;), Len(&nbsp;Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;)&nbsp;)&nbsp;-&nbsp;2 )** | Returns the result of **Concat** but removes the last two characters, which form the extraneous separator. | "Violin,&nbsp;Cello,&nbsp;Trumpet" |
104+
| **Match( Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;), "^(?&lt;trim&gt;.*),&nbsp;$" ).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,&nbsp;Cello,&nbsp;Trumpet" |
105105

106+
### Split and MatchAll
106107

108+
If you used **Concat** with a separator, you can reverse the operation by combining the **Split** and **MatchAll** functions.
107109

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.
108111

112+
| Formula | Description | Result |
113+
|---------|-------------|--------|
114+
| **Split( Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;), ", " )** | 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. | ![Table](media/function-concatenate/split.png) |
115+
| **MatchAll( Concat(&nbsp;Products,&nbsp;Name&nbsp;&&nbsp;",&nbsp;"&nbsp;), "[^\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. | ![Table](media/function-concatenate/matchall.png)

0 commit comments

Comments
 (0)