Configuring views within Microsoft Power Platform
Configuring views within Microsoft Power Platform is essential to effectively manage data in real-time. Understanding how to do this is crucial when training for the PL-400 Microsoft Power Platform Developer exam.
Views define the layout of a list of records. It helps you to view the fields from the associated entities and is beneficial when dealing with large quantities of data. By creating and configuring views, you can present users with only the data they need to see, simplify the information, and optimize system performance.
Types of Views in Microsoft Power Platform
There are several types of views in the Microsoft Power Platform:
- System views: These are views that come with the system and cannot be deleted but can be deactivated. They include ‘Active,’ ‘Inactive,’ and ‘All’ views, among others.
- Public views: These are custom views created by an administrator or customizer that are available to all users.
- Personal views: These are custom views created by individual users that are only available to, or shared with, specific users or teams.
System Views | Public Views | Personal Views | |
---|---|---|---|
Created by | System | Administrator or Customizer | Individual Users |
Can be deleted? | No | Yes | Yes |
Can be deactivated? | Yes | Yes | Yes |
Available to | All Users | All Users | Specific Users or Teams |
How to Create and Configure a View
Views can be created and managed in either the Power Apps portal or through code. When configuring views, attributes like name, columns, sort, and filter criteria need to be set accordingly. Let’s go through a detailed step-by-step example of creating and configuring a view in the Power Apps portal.
- Open data table views: In Power Apps, open
Data
from the left navigation pane, selectTables
, then select the table for which you want to create a view. After opening the table, select theViews
tab. - Create a new view: Select
New view
. A side pane appears where you can name your new view and select the type of view layout. - Configure the view: In the new view, you can arrange the columns, create sort orders, and add filter conditions.
- Columns: Add the columns you want to view and arrange them in the desired order. You can add columns from the current table or related tables.
- Sort: Specify how the records are sorted in the view. You can add multiple levels of sort criteria.
- Filter: Set filter conditions to control which records are displayed. You can use the ‘And/Or’ grouping to create complex criteria.
- Save and Publish the view: Once you’ve configured the view, remember to save your changes and then publish your new view.
Working with Views Programmatically
For the PL-400 exam, understanding how to work with views programmatically using the Web API is also crucial. To create a view programmatically, you need to create a SavedQuery
or UserQuery
entity. You should define the FetchXml
and LayoutXml
attributes according to the data you want to retrieve and how you want to display it.
This example demonstrates how to create a new system view for the account
entity:
SavedQuery newView = new SavedQuery
{
Name = "New View",
Description = "Sample view for PL-400 exam",
ReturnedTypeCode = "account",
FetchXml = "
LayoutXml = "
QueryType = 0, // for main views
IsDefault = false
};
_service.Create(newView);
In the FetchXml
string, specify the criteria for which records to display, and in the LayoutXml
string, specify the columns to display for each row of data.
Understanding how to configure views in Microsoft Power Platform can make a significant difference when preparing for the PL-400 exam. Whether you’re customizing views in the Power Apps portal or creating new views programmatically, the flexibility and control offered by views can help you deliver more effective and personalized solutions.
Practice Test
A Power Apps portal provides the ability to view and configure properties of views.
- A. True
- B. False
Answer: A. True
Explanation: Yes, Power Apps portal provides the capacity to view and configure properties of views such as sort columns, filter criteria, column visibility, and more.
Is it possible to create or modify system views directly in the Power Apps portal?
- A. Yes
- B. No
Answer: B. No
Explanation: You cannot create or modify system views directly in the Power Apps portal. You need to do it in the Power Apps maker portal.
You don’t need to publish your changes after configuring views in the Power Apps portal.
- A. True
- B. False
Answer: B. False
Explanation: The changes made while configuring views in the Power Apps portal must be published to make it available to users.
The default view in Power Apps can be changed through which of the following?
- A. Power BI
- B. Logic Apps
- C. Model-Driven App Designer
- D. Power Apps portal
Answer: C. Model-Driven App Designer
Explanation: The default view in Power Apps can be changed through the Model-Driven App Designer.
Worksheets often require manually configuring views.
- A. True
- B. False
Answer: A. True
Explanation: Certain worksheets often require manually configuring views.
Can you create custom views using FetchXML and LayoutXML in the Power Apps portal?
- A. Yes
- B. No
Answer: A. Yes
Explanation: Advanced developers can create custom views using FetchXML and LayoutXML in the Power Apps portal.
The customizing the view configuration in the Power Apps portal allows you to ______
- A. Change layout
- B. Change column widths
- C. Add or remove columns
- D. All of the above
Answer: D. All of the above
Explanation: Customizing the view configuration allows changes to layout, column widths and includes capabilities to add or remove columns.
“Edit columns” option in a Power Apps portal enables you to add new columns to the view.
- A. True
- B. False
Answer: A. True
Explanation: The “Edit Columns” option in a Power Apps portal indeed allows you to add new columns to the view.
It is not possible to define the sort order in view configuration settings in Power Apps portal.
- A. True
- B. False
Answer: B. False
Explanation: You can define the sort order in view configuration settings in the Power Apps portal.
The custom view can be uploaded as a solution in the Power Apps portal.
- A. True
- B. False
Answer: A. True
Explanation: After you create a custom view, you can upload it as a solution in the Power Apps portal.
The “Configure View” option is only available on the main form of a Power Apps portal.
- A. True
- B. False
Answer: B. False
Explanation: The “Configure View” option is available on all forms, not just main forms in a Power Apps portal.
Is it possible to configure a view to filter records based on the logged-in user?
- A. Yes
- B. No
Answer: A. Yes
Explanation: Yes, it is possible to configure a view to filter records based on the logged-in user in Power Apps portal.
Power Apps portal doesn’t support column configuration for tablets and smartphones.
- A. True
- B. False
Answer: A. True
Explanation: Currently, Power Apps portal doesn’t support separate column configuration for tablets and smartphones.
Which layout type is used for views in Power Apps portal?
- A. Grid layout
- B. Box layout
- C. Card layout
- D. Circle layout
Answer: A. Grid layout
Explanation: A Grid layout is used for views in Power Apps portal, providing a tabular view of the data.
In a Power Apps portal, corporate users must be given specific permissions to configure views.
- A. True
- B. False
Answer: A. True
Explanation: By default, corporate users do not have permissions to modify system views. They must be given specific permissions to configure views.
Interview Questions
What is the primary purpose of configuring views in Microsoft Power Platform?
Configuring views in Microsoft Power Platform allows users to customize and filter the information that is displayed in the list of items in an entity.
What are the two main types of views that can be used in Microsoft Power Platform?
The two main types of views used in Microsoft Power Platform are System views and Personal views.
What is the difference between System Views and Personal Views?
System views are created by administrators and are available to all users. Personal views are created by individual users and can be shared with others.
Can you configure views in Power Platform without writing code?
Yes, you can configure views in Power Platform without writing code. You can use the view editor to configure views.
How can you define the filter criteria for a view in Power Platform?
You can define the filter criteria for a view in Power Platform by specifying conditions in the view designer. These conditions determine what data is displayed when the view is used.
How can you add a column to a view in Power Platform?
You can add a column to a view in Power Platform in the view designer by selecting Add Columns from the menu and then choosing the fields you want to add.
What is the purpose of sorting in Power platform views?
Sorting in Power Platform views determines the order in which records are displayed. Users can sort by one or more columns to organize their data.
How can you set a default sort order for a view in Power Platform?
You can set a default sort order for a view in Power Platform in the view designer. Choose the column you want the data sorted by and use the Up or Down button to arrange it.
What is the maximum number of columns that can be displayed in a view?
A view can display up to 10 columns.
Can Lookups and Option sets be shown in views?
Yes, Lookups and Option sets can be shown in views.
How do you save your changes when editing a view in Microsoft Power Platform?
To save your changes when editing a view in Microsoft Power Platform, simply click on the Save button in the upper-right corner of the view designer.
Is it possible to delete a system view in Power platform?
No, system views can not be deleted in Power platform, but they can be deactivated.
Can you modify a personal view that was shared with you?
No, you cannot modify a personal view that was shared with you. Only the user who created the view can modify it.
Can you export and import views in Power Platform?
Yes, views can be exported and imported in Power Platform using solutions.
Can views be used to define charts and dashboards in Power Platform?
Yes, views in Power Platform can be used as a basis for defining charts and dashboards.