Skip to content

Commit 1be9dc0

Browse files
authored
Live publish
2 parents 012d8c4 + 1f3af77 commit 1be9dc0

22 files changed

+203
-4
lines changed

powerapps-docs/developer/data-platform/scalable-customization-design/database-transactions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Before understanding how customizations interact with the platform, it is useful
102102
|Forms (Retrieve)|&bull; Takes a read lock on the record shown.<br />&bull; Low impact on other uses.|
103103
|Create|&bull; Performs a create request through the platform<br />&bull; Low impact on other activities, as a new record nothing else blocking on it<br />&bull; Can potentially block locking queries to the whole table until it is complete.<br />&bull; Often can trigger related actions in customization which can have an impact.|
104104
|Update|&bull; Performs an update request through the platform.<br />&bull; More likely to have conflicts. An update lock will block anything else updating or reading that record. Also blocks anything taking a broad read lock on that table.<br />&bull; Often triggers other activities.|
105-
|View (RetrieveMultiple)|&bull; Would think this would block lots of other activity.<br />&bull; But deliberately passes `nolock` hints to queries<br />&bull; So typically does not lock other activities.<br />&bull; Although poor query optimization can affect DB resource usage and possibly hit timeouts.|
105+
|View (RetrieveMultiple)|&bull; Would think this would block lots of other activity.<br />&bull; Although poor query optimization can affect DB resource usage and possibly hit timeouts.|
106106

107107
## Event pipeline: platform step
108108

@@ -250,4 +250,4 @@ In addition to database transactions, it is important to appreciate the impact o
250250

251251

252252

253-
[!INCLUDE[footer-include](../../../includes/footer-banner.md)]
253+
[!INCLUDE[footer-include](../../../includes/footer-banner.md)]

powerapps-docs/maker/TOC.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,14 +1235,16 @@
12351235
items:
12361236
- name: "Access a view definition"
12371237
href: ./model-driven-apps/accessing-view-definitions.md
1238-
- name: Create and edit views
1239-
href: ./model-driven-apps/create-edit-views-app-designer.md
1238+
- name: Create and edit public views
1239+
href: ./model-driven-apps/create-or-edit-model-driven-app-view.md
12401240
- name: Choose and configure columns in views
12411241
href: ./model-driven-apps/choose-and-configure-columns.md
12421242
- name: Create or edit filters in app views
12431243
href: ./model-driven-apps/create-edit-view-filters.md
12441244
- name: "How to guides: Views"
12451245
items:
1246+
- name: Create and edit views
1247+
href: ./model-driven-apps/create-edit-views-app-designer.md
12461248
- name: How to make grids editable
12471249
href: ./model-driven-apps/make-grids-lists-editable-custom-control.md
12481250
- name: How to sort rows in a view
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
---
2+
title: "Create and edit public model-driven app views | MicrosoftDocs"
3+
description: "Learn how to create or edit public or system model-driven app views."
4+
ms.date: 07/04/2021
5+
ms.service: powerapps
6+
ms.subservice: mda-maker
7+
ms.topic: tutorial
8+
author: Joel-Lindstrom
9+
ms.author: v-ljoel
10+
ms.reviewer: matp
11+
---
12+
# Create and edit public model-driven app views
13+
14+
In Power Apps, views define how records for a specific table are displayed. A view defines the following behavior:
15+
- The columns, also known as attributes, to display.
16+
- The width of the columns in the view.
17+
- How the records are sorted by default.
18+
- Which filters are applied to determine the records that appear in the list by default.
19+
20+
Typically, views are classified into three types:
21+
- **Personal**: Individual users can create personal views according to their unique requirements. These views are visible only to the user who created them and anyone they choose to share them with.
22+
- **Public**: As an app maker, you can create and edit public views to fit your organizational requirements. These views are available in the view selector, and you can use them in subgrids in a form or as a list in a dashboard.
23+
- **System**: As an app maker, you can also modify system views to meet the requirements of your organization. These are special views that the application depends on: they exist for system tables or are automatically created when you create custom tables. These views are available to some or all users, depending on their privileges.
24+
25+
More information: [Understand model-driven app views](create-edit-views.md)
26+
27+
A drop-down list of views is commonly displayed in an app so that people have options for different views of table data, such as the Donations table in the Fundraiser sample app.
28+
:::image type="content" source="media/create-or-edit-model-driven-app-view/system-views-picker.png" alt-text="Select a system view from the view picker.":::
29+
30+
The records that are visible in individual views are displayed in a list, sometimes called a grid, which frequently provides options so that people can change the default sorting, column widths, and filters to more easily see the data that's important to them. Views also define the data source for charts that are used in the application.
31+
32+
In this tutorial, we perform several tasks required to work with views, such as create a public view, add an existing view to an app, and change columns, filters, and sort order for a view.
33+
34+
## Create a public view in Power Apps
35+
36+
In this exercise, you create a public view for the account entity. You then add this view to an app.
37+
38+
1. Sign in to [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc).
39+
40+
1. Expand **Data**, select **Tables**, select the **Account** table, and then select the **Views** tab.
41+
42+
1. On the toolbar, select **Add view**.
43+
44+
1. On the **Create a view** dialog box, enter *Accounts with revenue more than 50 K* as the **Name**. Optionally, enter a description, and then select **Create**.
45+
46+
1. In the view designer, select **+ View column** and add the **Address1: City** column to the view.
47+
48+
> [!TIP]
49+
> The **Default** view in the **Add column** pane displays the commonly used columns. If the column you want isn’t listed, select **All** to display additional columns.
50+
51+
![Select All to display all columns](media/create-or-edit-model-driven-app-view/create-a-public-view-in-power-apps-2.png "Select All to display all columns")
52+
53+
1. Repeat the previous step by selecting **Add column** and add the following additional columns to the view:
54+
- **Address 1: Country/Region**
55+
- **Address 1: Primary Contact**
56+
- **Annual Revenue**
57+
58+
1. Change the column filtering for the **Annual Revenue** field by selecting the header of the column, and then in the dropdown select **Filter by**. Select **Greater than** for the operator and then enter *50000* for the value. Select **Apply**.
59+
:::image type="content" source="media/create-or-edit-model-driven-app-view/accounts-more-50k-rev.png" alt-text="Add a filter for accounts with more than 50,000 revenue.":::
60+
Notice the view in the designer reacts to the filter.
61+
1. Change the column sorting to sort by the most to least revenue. To do this, select the header of the **Annual Revenue** column, and then select **Larger to smaller**. Notice for text-based columns the sort options are **Sort A to Z** and **Sort Z to A**.
62+
63+
1. Explore additional changes you can make to the view.
64+
- Increase a column width by selecting just to the right of the column heading you want to increase and drag the column to the right.
65+
- Reposition columns by dragging a column to the position you want to move it to. For example, select the **Primary Contact** column header and drag it between the **Account Name** and **Address 1: City** columns.
66+
67+
> [!NOTE]
68+
> You can also change column order by selecting the column header and then select **Move Right** or **Move Left**.
69+
70+
1. Select **Save**, and then select **Publish** to make the view available for other users in the environment.
71+
72+
## Add the view in the app designer
73+
74+
1. In Power Apps, select **Apps** from the left navigation pane, select **...** next to the unmanaged app you want, and then select **Edit** > **Edit in preview**. If you don't have an app to use, [Build your first model-driven app](build-first-model-driven-app.md).
75+
76+
1. In the **Pages** section of app designer, select **Account view**.
77+
1. In the right **Properties** pane, select **Manage views**, select the following views, and then select **Save**.
78+
- **Active Accounts**
79+
- **Inactive Accounts**
80+
- **Accounts with revenue more than 50K**
81+
:::image type="content" source="media/create-or-edit-model-driven-app-view/select-view-for-app.png" alt-text="Select the views you want to display":::
82+
1. Select **Publish** to save and publish the app.
83+
84+
### Display the view in an app
85+
86+
To see your view in the app, on the app designer command bar, select **Play**. Notice that the view is displayed and the additional **Active Accounts** and **Inactive Accounts** views are also available by selecting the view selector.
87+
:::image type="content" source="media/create-or-edit-model-driven-app-view/view-displayed-in-app.png" alt-text="Views available from an app":::
88+
89+
## Open and add the view in the classic app designer
90+
91+
1. In Power Apps, select **Apps** from the left navigation pane, select **...** next to the unmanaged app you want, and then select **Edit** . If you don't have an app to use, [Build your first model-driven app](build-first-model-driven-app.md).
92+
93+
1. In the app designer **Entity View** section, select **Views**.
94+
95+
![Table View section select Views](media/create-or-edit-model-driven-app-view/open-and-add-a-view-in-the-app-designer-1.png "Table View section select Views")
96+
97+
1. On the right **Components** tab, by default, all views are selected. To select specific views to display in the app, clear the **All** checkbox.
98+
99+
![select specific views to display in the app](media/create-or-edit-model-driven-app-view/open-and-add-a-view-in-the-app-designer-2.png "select specific views to display in the app")
100+
101+
1. To add an existing view to your app, select it from the list of views, or to create a new view from the app designer, select **Create New**.
102+
103+
> [!NOTE]
104+
> Views are displayed based on the table that you have selected. For example, when you select **Account**, views that are related to the account table are displayed.
105+
106+
### Add a column to your view in the classic app designer
107+
108+
Views display records from a table that contains rows and columns. Each record is a row, and the columns that are displayed from the record are determined by the columns you add to the view.
109+
110+
1. In app designer, select **Views**, then on the right **Components** pane place your mouse cursor over the view, and then select **edit** (pencil button).
111+
:::image type="content" source="media/create-or-edit-model-driven-app-view/edit-view.png" alt-text="Edit a view":::
112+
1. On the **Components** tab in the view designer, select the **Column Attributes** list for the **Primary Entity**.
113+
114+
![Add a column](media/create-or-edit-model-driven-app-view/open-and-add-a-view-in-the-app-designer-3.png "Add a column")
115+
116+
1. From the list of columns, select the column you want, such as the **Address 1: State/Province** column,and drag it to the view heading. You can also add the column by double-clicking it.
117+
:::image type="content" source="media/create-or-edit-model-driven-app-view/add-address1-state-column.png" alt-text="Add the Address 1: State/Province column to the view":::
118+
1. Repeat step 3 until you've added all the columns you want to display in your view. As you add columns, you can drag them to any position among existing column headings. You can also move columns around after you add them to your view by dragging the column heading to the column heading where you want to move it.
119+
1. Select **Save and Close** on the command bar, to save the view and return to the app designer.
120+
121+
### Define filter criteria in the classic app designer
122+
123+
You can set filter criteria so that only a subset of the records is displayed in a view. When a user opens the view, only the records that meet the defined filter criteria are displayed. You can select columns from both the primary and related tables to filter on.
124+
125+
1. In app designer, select **Views**, then on the right **Components** pane place your mouse cursor over the view, and then select edit (pencil button).
126+
:::image type="content" source="media/create-or-edit-model-driven-app-view/edit-view.png" alt-text="Edit a view":::
127+
1. In the view designer, expand the **Filter Criteria** section, and then select **Add Filter**.
128+
129+
![Set Filter Criteria](media/create-or-edit-model-driven-app-view/define-filter-criteria-in-app-designer-1.png "Set Filter Criteria")
130+
131+
1. Select the **Address1: State/Province** column from the drop-down list in the first column.
132+
133+
1. Select the **Equals** operator from the drop-down list in the second column.
134+
135+
1. Enter *TX* as the value to filter by in the third column.
136+
137+
![Set Filter Criteria Operator](media/create-or-edit-model-driven-app-view/define-filter-criteria-in-app-designer-2.png "Set Filter Criteria Operator")
138+
139+
Notice how the view now shows accounts with annual revenue greater than $50,000 in the state of Texas (TX).
140+
1. Select **Save and Close** on the command bar, to save the view and return to the app designer.
141+
<!-- You can also filter data based on the attributes of related tables in addition to the
142+
primary table.
143+
144+
1. On the **Components** tab, select the **Column Attributes** list for **Related Table**, select a related table from the drop down list, and then choose the table you want. This will add a separate section.
145+
146+
2. Repeat steps 2 through 5 from the previous procedure.
147+
148+
More information: [Create and edit relationships between tables](https://docs.microsoft.com/powerapps/maker/data-platform/create-edit-entity-relationships) -->
149+
150+
#### Group multiple filters in the classic app designer
151+
152+
You can add multiple filters to your view if you want to filter records by using more than one column.
153+
154+
1. Select the filters that you want to group.
155+
![Set Group Filter](media/create-or-edit-model-driven-app-view/group-multiple-filters-in-app-designer-1.png "Set Group Filter")
156+
157+
1. Select **Group And** or **Group Or** to group the filters.
158+
![Group Filter Selection](media/create-or-edit-model-driven-app-view/group-multiple-filters-in-app-designer-2.png "Group Filter Selection")
159+
160+
When you select **Group And**, only records that meet both criteria are displayed in the view. When you select **Group Or**, records that meet any of the filter criteria are displayed. For example, to show only records that have priority of **High** or **Normal**, and a status of **Active**, select **Group And**.
161+
162+
To remove the filter from a group, select the group, and then select **Ungroup**.
163+
164+
### Set primary and secondary sort order for columns in the classic app designer
165+
166+
When a view is opened, the records displayed are sorted in the order you set when you created the view. By default, records will be sorted according to the first column in a view when no sort order is selected. You can choose to sort on a single column, or you can choose two columns—one primary and one secondary—to sort by. When the view is opened, the records are first sorted by the column you want to use for primary sort order, and then by the column you want to use for the secondary sort order.
167+
168+
> [!NOTE]
169+
> You can only set primary and secondary sort order for column attributes you added from the primary table.
170+
171+
1. In app designer, select **Views**, then on the right **Components** pane place your mouse cursor over the view, and then select edit (pencil button).
172+
:::image type="content" source="media/create-or-edit-model-driven-app-view/edit-view.png" alt-text="Edit a view":::
173+
1. In the **Columns** area of the view designer, select the column heading you want to use for sorting, such as **Business Phone**, select the down arrow, and then choose **Primary Sort** or **Secondary Sort**.
174+
175+
![Sort Record](media/create-or-edit-model-driven-app-view/set-primary-and-secondary-sort-order-for-columns-in-app-designer-1.png "Sort Record")
176+
177+
If you remove the column you chose for the primary sort order, the column you chose for the secondary sort order becomes the primary.
178+
179+
### Edit an active public or system view in app designer
180+
181+
You can change the way an active public or system view is displayed that's selected for the app by opening it from the app designer canvas.
182+
183+
1. In the **Views** list for a table, select the **Show list of references** down arrow
184+
![Drop Down](media/create-or-edit-model-driven-app-view/edit-a-public-or-system-view-in-app-designer-2.png "Drop Down").
185+
> [!NOTE]
186+
> The down arrow is only displayed when the table views are not configured to use **All** views.
187+
188+
1. Select the active view ![Open view Designer pencil icon](media/create-or-edit-model-driven-app-view/edit-a-public-or-system-view-in-app-designer-3.png "Open view Designer") that you want to open for editing.
189+
190+
![change the way a public or system view is displayed](media/create-or-edit-model-driven-app-view/edit-a-public-or-system-view-in-app-designer-1.png "change the way a public or system view is displayed")
191+
192+
When you edit a public or system view, you must save and publish your changes before they will be visible in the application.
193+
194+
### See also
195+
196+
[Create a model-driven app with the app designer](create-model-driven-app.md) <br />
197+
[Design custom business apps by using the app designer](design-custom-business-apps-using-app-designer.md)

0 commit comments

Comments
 (0)