Skip to content

Commit 19acfb3

Browse files
authored
Merge pull request #1399 from MicrosoftDocs/anneta-concurrent
updated function-concurrent, add-gallery to match UI
2 parents 2719d26 + be9b141 commit 19acfb3

File tree

10 files changed

+51
-57
lines changed

10 files changed

+51
-57
lines changed

powerapps-docs/maker/canvas-apps/add-gallery.md

Lines changed: 50 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -20,120 +20,114 @@ Show a list of items from any data source by adding a **[Gallery](controls/contr
2020

2121
## Prerequisites
2222

23-
* Learn how to [add and configure a control](add-configure-controls.md) in PowerApps.
23+
- Learn how to [add and configure a control](add-configure-controls.md) in PowerApps.
2424

25-
* Set up the sample data:
25+
- Set up the sample data:
2626
1. Download [this Excel file](https://az787822.vo.msecnd.net/documentation/get-started-from-data/FlooringEstimates.xlsx), which contains sample data for this tutorial.
2727

2828
2. Upload the Excel file to a [cloud-storage account](connections/cloud-storage-blob-connections.md), such as OneDrive for Business.
2929

30-
## Add a Gallery control
31-
1. Open PowerApps, and then click or tap **New** near the left edge.
30+
- Open a blank app:
31+
1. [Sign in to PowerApps](http://web.powerapps.com?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc).
3232

33-
2. On the **Blank app** tile, click or tap **Phone layout**.
33+
1. Under **Make your own app**, select **Canvas app from blank**.
3434

35-
3. In the **Welcome to PowerApps Studio** dialog box, click or tap **Skip**.
35+
1. Specify a name for your app, select **Phone**, and then select **Create**.
3636

37-
4. [Add a connection](add-data-connection.md) to the **FlooringEstimates** table in the Excel file.
37+
1. If the **Welcome to PowerApps Studio** dialog box appears, select **Skip**.
3838

39-
5. (optional) Add a **Gallery** control to the default screen by clicking or tapping the **Insert** tab, clicking or tapping **Gallery**, and then clicking or tapping a **Gallery** control that's empty (blank) or that contains a default set of controls.
39+
1. [Add a connection](add-data-connection.md) to the **FlooringEstimates** table in the Excel file.
4040

41-
These options include **Gallery** controls that scroll horizontally or vertically. You can also add a **Gallery** control that automatically bases its size on the amount of content in each item.
41+
## Add a gallery to a blank screen
4242

43-
![Add gallery](./media/add-gallery/gallery-dropdown.png)
43+
1. On the **Insert** tab, select **Gallery**, and then select **Vertical**.
4444

45-
6. On the **Home** tab, click or tap **New screen**.
45+
![Add vertical gallery](./media/add-gallery/gallery-dropdown.png)
4646

47-
You can add a screen that's empty, that scrolls, that contains a **Gallery** control, or that contains a form.
47+
1. On the **Properties** tab of the right-hand pane, open the **Items** list, and then select **Flooring Estimates**.
4848

49-
7. Click or tap **List screen** to add a screen that contains a **Gallery** control and other controls such as a search bar.
49+
![Flooring estimates](./media/add-gallery/select-layout.png)
5050

51-
> [!NOTE]
52-
> Whether you add a **Gallery** control to a new screen or an existing one, you can click or tap near the bottom of the **Gallery** control to select it, click or tap **Flooring Estimates** in the right-hand pane, and then click or tap a different layout in the **Data** pane. For this tutorial, leave the default layout.
51+
1. (optional) In the **Layout** list, select a different option.
5352

54-
![Choose gallery layout](./media/add-gallery/select-layout.png)
53+
## Add a gallery in a screen
5554

56-
8. Click or tap the **Gallery** control in the screen that you just added.
55+
1. On the **Home** tab, select **New screen** > **List screen**.
5756

58-
9. On the **Properties** tab of the right-hand pane, click or tap **CustomGallerySample**.
57+
A screen that contains a **Gallery** control and other controls, such as a search bar, appears.
5958

60-
10. In the **Data** pane, click or tap **CustomGallerySample**, and then click or tap **FlooringEstimates**.
61-
62-
![Select datasource](./media/add-gallery/choose-data.png)
59+
1. Set the gallery's **Items** property to `FlooringEstimates`.
6360

6461
The **Gallery** control shows the sample data.
6562

6663
![Show data](./media/add-gallery/show-data-default.png)
6764

68-
You'll configure sort and search later in this topic.
69-
7065
## Add a control to the Gallery control
71-
Before you do any customization, decide on a **Gallery** control layout. The first set of controls in a **Gallery** control is the template, which determines how all data in the **Gallery** control appears.
66+
Before you do any other customization, ensure that the layout for your **Gallery** control most closely matches what you want. From there, you can further modify the **Gallery** template, which determines how all data in the **Gallery** control appears.
7267

73-
1. Select the template by clicking or tapping near the bottom of the **Gallery** control and then clicking or tapping the pencil icon in the upper-left corner.
68+
1. Select the template by clicking or tapping near the bottom of the **Gallery** control and then selecting the pencil icon in its upper-left corner.
7469

7570
![Edit gallery template](./media/add-gallery/edit-item.png)
7671

7772
2. With the template still selected, add a **[Label](controls/control-text-box.md)** control, and then move and resize it so that it doesn't overlap with other controls in the template.
7873

7974
![Add label](./media/add-gallery/add-text-box.png)
80-
3. Open the **Data** pane by selecting the template and then clicking or tapping **Flooring Estimates** in the right-hand pane.
75+
76+
3. Select the gallery, and then select **Edit** next to **Fields** on the **Properties** tab of the right-hand pane.
8177

8278
4. Select the label that you added earlier in this procedure, and then open the highlighted list in the **Data** pane.
8379

8480
![Open drop-down list](./media/add-gallery/open-dropdown.png)
8581

8682
5. In that list, click or tap **Price**.
8783

88-
![Change label binding](./media/add-gallery/change-binding.png)
89-
9084
The **Gallery** control shows the new values.
9185

9286
![Final Gallery](./media/add-gallery/final-gallery.png)
9387

94-
## Filter the Gallery control
95-
The **[Items](controls/properties-core.md)** property of a **Gallery** control determines which items it shows. In this procedure, you configure that property so that the **Gallery** control shows only those items for which the product name contains the text in **TextSearchBox1**.
96-
97-
![Text search box](./media/add-gallery/text-search-box.png)
98-
99-
1. Select the **Gallery** control by clicking or tapping near the bottom of that control.
100-
101-
2. On the **Advanced** tab, set the **[Items](controls/properties-core.md)** property of the **Gallery** control to this formula:
88+
## Filter and sort a gallery
89+
The **[Items](controls/properties-core.md)** property of a **Gallery** control determines which items it shows. In this procedure, you configure that property so that it also determines which records appear based on filter criteria and in what order.
10290

103-
**If(IsBlank(TextSearchBox1.Text), FlooringEstimates, Filter(FlooringEstimates, TextSearchBox1.Text in Text(Name)))**
104-
105-
For more information about the functions in this formula, see the [formula reference](formula-reference.md).
106-
107-
3. Type part or all of a product name in the search box.
108-
109-
The **Gallery** control shows only those items that meet the filter criterion.
110-
111-
## Sort the Gallery control
112-
The **[Items](controls/properties-core.md)** property of a **Gallery** control determines the order in which it shows items. In this procedure, you configure that property so that the **Gallery** control shows the order of items as set by **ImageSortUpDown1**.
113-
114-
![Image for sorting](./media/add-gallery/image-sorting.png)
91+
![Search box and sort icon](./media/add-gallery/text-search-box.png)
11592

11693
1. Set the **[Items](controls/properties-core.md)** property of the **Gallery** control to this formula:
11794

118-
**Sort(If(IsBlank(TextSearchBox1.Text), FlooringEstimates, Filter(FlooringEstimates, TextSearchBox1.Text in Text(Name))), Name, If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))**
95+
```powerapps-dot
96+
Sort
97+
(If
98+
(IsBlank(TextSearchBox1.Text),
99+
FlooringEstimates,
100+
Filter(
101+
FlooringEstimates,
102+
TextSearchBox1.Text in Text(Name)
103+
)
104+
),
105+
Name,
106+
If(
107+
SortDescending1,
108+
SortOrder.Descending,
109+
SortOrder.Ascending
110+
)
111+
)
112+
```
119113
120-
2. Select the sort icon to change the sorting order of the **Gallery** control by the names of the products.
114+
For more information about the functions in this formula, see the [formula reference](formula-reference.md).
121115
122-
To sort *and* filter your **Gallery** control:
116+
1. Double-click the search box, and then type part or all of a product name in it.
123117
124-
* Replace both instances of *DataSource* in this formula with the name of your data source.
118+
Only those items that meet the filter criterion appear.
125119
126-
* Replace both instances of *ColumnName* with the name of the column by which you want to sort and filter.
120+
1. While pressing the Alt key, select the sort icon one or more times to switch the sort order.
127121
128-
**Sort(If(IsBlank(TextSearchBox1.Text),** *DataSource*, **Filter(** *DataSource*, **TextSearchBox1.Text in Text(** *ColumnName* **))),** *ColumnName*, **If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))**
122+
The records toggle between ascending and descending alphabetical order based on the product name.
129123
130124
## Highlight the selected item
131-
Set the **Gallery** control's **TemplateFill** property to a formula that's similar to this example:
125+
Set the **Gallery** control's **TemplateFill** property to a formula that's similar to this example, but you can specify different colors if you want:
132126
133127
**If(ThisItem.IsSelected, LightCyan, White)**
134128
135129
## Change the default selection
136-
Set the **Gallery** control's **Default** property to the record that you want to select by default. For example, specify the fifth item in the **FlooringEstimates** data source:
130+
Set the **Gallery** control's **Default** property to the record that you want to select by default. For example, you can specify the fifth item in the **FlooringEstimates** data source:
137131
138132
**Last(FirstN(FlooringEstimates, 5))**
139133

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ You can use **Concurrent** only in [behavior formulas](../working-with-formulas-
125125
126126
4. Add a [**Data table**](../controls/control-data-table.md) control, and set its **Items** property to **Results**.
127127
128-
1. On the **Properties** tab of the right pane, select **Results** to open the **Data** pane.
128+
1. On the **Properties** tab of the right pane, select **Edit fields** to open the **Fields** pane.
129129
130130
1. In the list of fields, select the check box for each field to show them all in the data table.
131131
Loading
Binary file not shown.
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)