0% found this document useful (0 votes)
19 views62 pages

Module 2 - Microsoft Dataverse

The document provides a hands-on lab guide for using Microsoft Dataverse within the Power Platform, focusing on creating and managing custom tables and columns. It includes prerequisites, an overview of Dataverse, and step-by-step exercises for exploring standard tables, creating custom tables, and implementing business rules. The lab aims to equip users with skills to provision a Dataverse database and utilize it effectively in Power Apps.

Uploaded by

A
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views62 pages

Module 2 - Microsoft Dataverse

The document provides a hands-on lab guide for using Microsoft Dataverse within the Power Platform, focusing on creating and managing custom tables and columns. It includes prerequisites, an overview of Dataverse, and step-by-step exercises for exploring standard tables, creating custom tables, and implementing business rules. The lab aims to equip users with skills to provision a Dataverse database and utilize it effectively in Power Apps.

Uploaded by

A
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Power Platform

App in a Day
Module 2: Microsoft Dataverse
Hands-on Lab Step-by-Step

July 2023
Power Platform App in a Day Microsoft Dataverse

Contents
Microsoft Dataverse .............................................................................................................................................................. 2

Lab Prerequisites ............................................................................................................................................................................................................... 2


Before you begin ................................................................................................................................................................................................................ 2
Overview ............................................................................................................................................................................................................................... 2
Goals for this lab ............................................................................................................................................................................................................... 3

Exercise 1: Exploring Microsoft Dataverse .......................................................................................................................... 4

Task 1: Explore standard Tables ................................................................................................................................................................................... 4


Task 2: Explore Standard Choices .............................................................................................................................................................................. 16

Exercise 2: Custom Tables and Columns ............................................................................................................................ 17

Task 1: Create a custom table .................................................................................................................................................................................... 17


Task 2: Create custom columns ................................................................................................................................................................................. 18
Task 3: Create a calculated column.......................................................................................................................................................................... 23
Task 4: Create a business rule .................................................................................................................................................................................... 25

Exercise 3: Connect the data from the Canvas App .......................................................................................................... 30

Task 1: Add Microsoft Dataverse table as a data source to the app ............................................................................................................. 30
Task 2: Create the edit form ........................................................................................................................................................................................ 31
Task 3: Configure the title column ............................................................................................................................................................................ 37
Task 4: Configure the price Field ............................................................................................................................................................................... 39
Task 5: Configure the Approval Field ....................................................................................................................................................................... 41
Task 6: Configure the Comment Field ..................................................................................................................................................................... 43
Task 7: Configure the Requested By Field .............................................................................................................................................................. 43
Task 8: Configure the requested date Field ............................................................................................................................................................ 44
Task 9: Add a button to submit the form ............................................................................................................................................................... 45
Task 10: Test the form ................................................................................................................................................................................................... 47
Task 11: Verify a new item was added to the Machine Order table ............................................................................................................. 49
Task 12: [Optional] Navigate to confirmation screen after the Form submit is successful .................................................................. 51

References ............................................................................................................................................................................ 59

Copyright ............................................................................................................................................................................. 60

1|Page ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Microsoft Dataverse
Lab Prerequisites
This is the second lab in a series covering Power Apps Canvas Apps, Microsoft Dataverse, Power Apps Model-driven Apps,
and Power Automate. The assumption is that you have successfully completed the initial part of setting up an environment
as described in the overview document – “00-AppInADay Lab [Link]”.

If you have not completed building the Power Apps Canvas App in Module 1, you can use the partially completed version
of the lab package in the “\Completed\Module1” folder. Follow the instructions in the document “Importing Contoso
Coffee” before proceeding with this module.

Before you begin


You must be connected to the internet.

1. Have a Test Environment with permission to create a Microsoft Dataverse database: You should have
gone through the steps to create a new environment using the Admin center. In this lab, you will create a
database in this environment, if you haven’t already created one.
2. Sign-in to Power Apps: Go to Power Apps and sign in with the same account you used to complete the first
lab. Make sure you switch to the environment where you created the app.

Overview
Microsoft Dataverse adds data storage and modeling capabilities to Power Apps that is scalable and easy to provision. In
this module, you will be using Microsoft Dataverse to model and store the data from the machine ordering canvas app
that you built in module 1. In the next module, you will be building a model-driven application using the same data that
will be used by the back-office staff to process the machine orders. These apps that you build on Microsoft Dataverse use
the same technology framework (Microsoft Dataverse) that Microsoft Dynamics 365 apps are built-on.

©2023 Microsoft Corporation 2|Page


Power Platform App in a Day Microsoft Dataverse

Goals for this lab


After this lesson you will be able to:
• Provision a Microsoft Dataverse database
• Create a custom table and add custom columns to it The time to complete
• Use the Power Apps Form control to populate the table this lab is [60]
• View the table data minutes.
• Create a calculated column
• Implement a server-side business rule

3|Page ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Exercise 1: Exploring Microsoft Dataverse


In this exercise, you will explore Microsoft Dataverse standard tables. Tables in Microsoft Dataverse are like tables in a
database or worksheets in Microsoft Excel. Tables can be connected together with relationships that model real world
interactions between the data. Each table contains multiple Rows (Records), each having data columns. For example, a
“Project” table may have columns such as Name, Due Date, Status, etc. and it may be related to a “Project Owner” table
which might have columns such as Name, Email, etc.

Microsoft Dataverse abstracts a lot of the typical low-level database management work to make it easier for you to
configure a custom data model that fits your application.

In addition to allowing for the creation of custom Tables, Microsoft Dataverse contains a Common Data Model (CDM)
consisting of hundreds of standard table definitions. You can find the current CDM schema at Github Microsoft CDM and
you can browse the CDM using the CDM Visual Table Navigator located here Github CDM. You can read more about the
CDM here Common Data Model Overview .

Task 1: Explore standard Tables


In this task, you will explore Microsoft Dataverse standard Tables.

Before beginning the exercises, navigate to Make Power Apps and confirm that you are in the desired environment for the
labs.

1. Select Tables.

©2023 Microsoft Corporation 4|Page


Power Platform App in a Day Microsoft Dataverse

2. This will bring up the list of tables in this environment. Click on a few of the standard Tables (for example,
Account) to get familiar with some of the features of a table.

For detailed documentation on Microsoft Dataverse Tables, see [Link]


us/powerapps/developer/common-data-service/reference/about-entity-reference

Table properties:

Here, you can find the table name, table type, table primary column, and table description. You can also copy table set
name, schema name, or logical name via the tools button.

5|Page ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Table schema:

Here, you can navigate to the table columns, relationships, and keys. Select Columns.

Columns:

A table has a list of columns. In the example below, the “Account” table has columns such as Account Name, Account
Number, etc. Each column has a data type, such as Text, Number, etc. The data type is chosen when you create a column
and is not changeable. The data type also defines many of the characteristics and behaviors of the column when your
application runs. For example, a Choice column allows you to have a pre-defined list of values for use in your application.
When this column is used on a form in a model-driven application the visual presentation is a drop-down control. The
column helps to ensure data consistency and allows for built-in support for multi-language applications.

©2023 Microsoft Corporation 6|Page


Power Platform App in a Day Microsoft Dataverse

For a list of supported data types, see Microsoft Dataverse Supported Data Types

Go back to the table by clicking on the browser back button.

Select Relationships.

Relationships:

Relationships allows you to manage relationships between Tables. Relationships supported are One to Many (1:N), Many
to One (N:1) and Many to Many (N:N). Relationships also define the behavior that happens when actions occur on the
primary Row in a 1:N relationship. For example, if the parent Row is deleted you can configure the relationship behavior
so that all child Rows are also deleted or simply remove the reference.

7|Page ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Go back to the table by clicking on the browser back button.

Select Keys.

Keys:

Allows you to view the lookup keys for the table. Keys can contain multiple columns to define a composite key. Keys
enforce uniqueness, so they should not be used when there is a need to store duplicate values of columns used.

Go back to the table by clicking on the browser back button.

Table Data experience:


©2023 Microsoft Corporation 8|Page
Power Platform App in a Day Microsoft Dataverse

Here, you can navigate to the table forms, views, charts, and dashboards. Select Forms.

Forms:

Forms provide the user interface that people use to interact with the data they need to do their work. It's important that
the forms people use are designed to allow them to find or enter the information they need efficiently. You can create
different types of forms like Quick Create, Quick View, Card, and a Main form. For some of these forms you can have more
than one version, to accommodate for different user roles within your organization.

Go back to the table by clicking on the browser back button.

Select Views.

9|Page ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Views:

Views will let you define how a list of Rows are shown in the app. You can create multiple custom views, each having their
own filtering and sorting criteria. For example, you could create a view to see only the Rows created in the last week and
another one to see Rows that haven’t been updated in a year. Create views to make the application users more
productive in filtering their data.

Go back to the table by clicking on the browser back button.

Select Charts.

©2023 Microsoft Corporation 10 | P a g e


Power Platform App in a Day Microsoft Dataverse

Charts:

Use Charts to display high-level view of your data in insightful and graphical ways.

Go back to the table by clicking on the browser back button.

Select Dashboards.

11 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Dashboards:

Dashboards helps you bring your views, charts, and web resources together in one place.

Go back to the table by clicking on the browser back button.

Table Customizations:

Here, you can navigate to the table business rules and commands. Select Business rules.

Business rules:

Building a Business Rule is like building a flowchart where you can define conditions and actions. You can learn more
about Business rules in the link below.

Business Rules Recommendations: Business Rules Recommendations

©2023 Microsoft Corporation 12 | P a g e


Power Platform App in a Day Microsoft Dataverse

Go back to the table by clicking on the browser back button.

Select Commands.

Commands:

Microsoft Dataverse allows you to create your own command bar buttons. The commands added to this table will be listed
here.

13 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Go back to the table by clicking on the browser back button.

Table columns and date:

Here, you will see the first 10 rows of the table data. You can also see more columns via the show existing columns button,
add new column via the + new column button, edit table data via the edit button, and order columns to your liking by
dragging and dropping columns.

Select the Edit button.

Table Edit:

Here you can create e new row, create a new column, refresh the data to see the latest rows, create an app from the data,
and edit the table properties.

You can delete one or more rows by selecting the row/s you would like to delete. DO NOT delete rows.

©2023 Microsoft Corporation 14 | P a g e


Power Platform App in a Day Microsoft Dataverse

Click on the  Back button.

15 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Task 2: Explore Standard Choices


Just like standard tables, the Microsoft Dataverse includes a set of standard Choices. You can also create custom Choices.
Later in this lab, we will create a custom Choice called ApprovalStatus to set the approval status of a machine order.

1. Select … More and then select Choices.

2. Examine the standard Choices.

©2023 Microsoft Corporation 16 | P a g e


Power Platform App in a Day Microsoft Dataverse

Exercise 2: Custom Tables and Columns


In this exercise, you will create a new custom table named Machine Order and add columns necessary to track the
machine requests. You will also create a server-side Business Rule that will default the estimated ship date.

Task 1: Create a custom table


In this task, you will create a custom table to store machine order requests.

1. Select Solutions and click to open the Contoso Coffee solution.


2. Click + New and select Table > Table.

3. Enter Machine Order for Display Name. The Plural name will automatically populate based on your entry. These
are editable in case you need to make any changes. The plural name is used by the system by default anytime a
set of the Rows are shown. Check the Enable attachments since this will allow creating notes on the machine
order.

17 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

4. Select the Primary column tab.


5. Change the Display Name to Machine Name. The primary column defaults to being named Name, for some
scenarios that might not be the best label and you can customize it if needed. The primary column however is
always a Text column, that is not changeable.
6. Click Save.

Task 2: Create custom columns


In this task, you will create custom columns for the Machine Order table. It may take a few minutes for your new Machine
Order table to provision. Begin these steps once it has finished.

1. Click to open the Machine Order table you created.


2. Click + New and select Column.

3. Enter Price for Display Name, type Machine Price for description, select Currency for Data Type, make the
column Business Required and Searchable and click Advanced Options.

Note: Currency is a special data type that allows you to build multi-currency solutions. For each currency column
you add, another currency column is added with the prefix “_Base” on the name. This column stores the
calculation of the value of the currency column you added and the base currency. For additional information on
using the Currency column, see here.

©2023 Microsoft Corporation 18 | P a g e


Power Platform App in a Day Microsoft Dataverse

4. Enter 0 for Minimum Value, 50000 for Maximum Value, and click Save.

19 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

5. Click + New and select Column again.


6. Enter Requested By for Display Name, Single line of text for Data type, Email for Format, make the column
Searchable and click Save.

7. Now repeat the Add Column process and add the following columns

Display Name Data type Format


Request Date Date and time Date only
Approver Single line of text Email
Comments Multiple lines of Text
text
Estimated Ship Date Date and time Date only
Approved Date Date and time Date only

8. Now we are going to create the Approval Choice. We are adding this as a Choice (as opposed to a two option)
because it is likely in the future there will be more than Yes/No for users to choose from. Click + New and select
Column.
9. Enter Approval Status for Display Name, select Choice for Data Type, select No for Sync with global choice,
enter Approve for Label and click + New choice.

©2023 Microsoft Corporation 20 | P a g e


Power Platform App in a Day Microsoft Dataverse

10. Enter Reject for Label and click Save.

21 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

©2023 Microsoft Corporation 22 | P a g e


Power Platform App in a Day Microsoft Dataverse

Task 3: Create a calculated column


In this task, you will add a Department Contribution column and set its value to 10% of the price. In our scenario, this is
the amount that will come from the department manager’s budget. Calculated columns are special columns that
automatically perform the calculation when the data is retrieved. When you create or modify a calculated column you set
the formula used in the calculation.

1. Click + New and select Column.


2. Enter Department Contribution for Display Name, Currency for Data Type, and select Calculated for Behavior.

3. Click Save and Edit.

4. If you have not yet allowed popups from Power Apps, you will be prompted to do so now.

23 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

5. Click Add Action.

6. Type price and select the Price column you created.

7. Add * 0.1 and click the Check Mark button.

8. Click Save and Close.

©2023 Microsoft Corporation 24 | P a g e


Power Platform App in a Day Microsoft Dataverse

Task 4: Create a business rule


In this task, you will create a Business rule that will set the Estimated Delivery Date to 14 days after approval of the order.

1. Click + New and select Business rule.

2. Click the arrow to Show Details.

25 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

3. Change the Name to Calculate Ship Date and click the arrow to Hide Details.

4. Select the Condition, change the name to Check Approved Date.

5. In the Rule 1 section select Entity for Source, Approved Date for Field, Contains Data for Operator and click
Apply.

Note: You may need to scroll down to the bottom of all scroll bars to see the Apply button. You must click Apply after any
change to the properties otherwise they will revert to the prior value. The Business Rule (Text View) will automatically update
after you hit apply when you are done modifying the rule.

©2023 Microsoft Corporation 26 | P a g e


Power Platform App in a Day Microsoft Dataverse

6. Click Add, select Add Set Field Value.

7. Select the True side of the condition.

27 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

8. Enter Set Estimated Ship Date for Display Name, select Estimated Ship Date for Field, Formula for Type,
Approved Date for Field, + for Operator, Value for Type, 14 for Days, and click Apply.

9. Click Validate.

10. Make sure validation succeeds.

©2023 Microsoft Corporation 28 | P a g e


Power Platform App in a Day Microsoft Dataverse

11. Click Save.

12. Click Activate.

13. Confirm activation. Business rules only execute when they are activated. In the future to make changes to rules
you deactivate them, make the change, and then re-activate the rule.

14. Close the process editor browser window or tab.


15. Click Done. The list should refresh showing the Business Rule you just created.

16. Do not navigate away from this page


29 | P a g e ©2023 Microsoft Corporation
Power Platform App in a Day Microsoft Dataverse

Exercise 3: Connect the data from the Canvas


App
Now that you have created the table to store machine order requests let’s connect your Machine Ordering Canvas app to
this table and add a form to submit machine approval requests.

Task 1: Add Microsoft Dataverse table as a data source to the app


Open the machine ordering app. Make sure you are opening the version of the app that is in the newly created
environment that has the Microsoft Dataverse database instance.

1. Select Apps, select the Machine Order App you created in Module 1, and click Edit.

2. Select the Data sources to display the current sources. Select + Add Data.

3. Click on Machine Orders from the table list to include it as a data source for our app.

©2023 Microsoft Corporation 30 | P a g e


Power Platform App in a Day Microsoft Dataverse

Task 2: Create the edit form


1. Switch to the Tree view and select the Main Screen.

31 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

2. Select few machines. Hold the “Alt” key, and then it will allow you to check the compare check box.

3. Select the Compare Screen. You should now have the selected machines.

4. Select the + Insert tab, search for edit and select Edit form.

©2023 Microsoft Corporation 32 | P a g e


Power Platform App in a Day Microsoft Dataverse

5. Click the Data Source drop-down in the Data pane on the right.

6. Select the Machine Orders table as the data source.

33 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

7. Click Edit Fields.

8. Add, remove, and order fields like the list below. The fields are added using the plus sign and can be reordered by
dragging the field to the desired placement.
a. Machine Name
b. Price
c. Approver
d. Comments
e. Requested By
f. Request Date

9. Close the Fields pane.


10. Rename the form Machine Order Form.

©2023 Microsoft Corporation 34 | P a g e


Power Platform App in a Day Microsoft Dataverse

11. Select the Machine Order Form.


12. Set the X value of the Machine Order Form to 840.
13. Set the Y value of the Machine Order Form to 60.
14. Set the Width value of the Machine Order Form to 520.
15. Set the Height value of the Machine Order Form to 650.
16. Change the Snap to columns setting from 3 to 1. This will modify the layout of the edit form to be single
column.

17. The form should now look like the image below.

35 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Note: You can always select controls, such as the Form1 control, from the tree view on the left to make sure you are
selecting the correct control. To move it make sure you select the Form and not a control within the form.

For more info on working with multi-column form layouts, see Working with forms layout.

18. To create a new instance of the form when the screen is loaded. Click Compare Screen in left tree view pane.

19. Select the OnVisible property of the screen, enter: NewForm('Machine Order Form')

©2023 Microsoft Corporation 36 | P a g e


Power Platform App in a Day Microsoft Dataverse

Task 3: Configure the title column


In the next few steps, you will configure each of the form Fields.

Let’s start by configuring the Title to display the machine type and machine name for the selected machine. For example, if
the user selects the Smart Brew 300 coffee makers, we want the machine order to have the title: “At home coffee makers –
Smart Brew 300”.

1. Expand the Machine Name.

Notice that the default card contains a few controls:

StarVisible1: This is a label control that has an asterisk (*) which has its Visible property set to true or false depending
on whether the Field is Required or not. Since the Title Field was marked as Required when you configured the table,
its Required property is set to true.
ErrorMessage1: This is a label that is just below the main data entry Field which displays error messages.
DataCardValue1: This is the text input control where you can enter the Title. For this scenario, we will set the title
based on the selected machine.
DataCardKey1: This is the label that displays the title of the Field.

37 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

2. Select Machine Name DataCardValue in the tree view. Then, open the Advanced tab in the right-hand pane.

3. Click Unlock so you can customize the card.

For the next few steps, we will use the Advanced pane to customize control properties within the form, note that you can
perform the same customizations using the property drop-down and formula bar in the top left of the studio.

4. Go to the Data section and set the Default property to.

'Compare List Gallery'.Selected.'Machine Type' & " - " & 'Compare List
Gallery'.Selected.'Machine Name'

©2023 Microsoft Corporation 38 | P a g e


Power Platform App in a Day Microsoft Dataverse

5. Change the DisplayMode to [Link]. This will prevent users from changing the value within the text
box.

Task 4: Configure the price Field


In this task, we are going to set the price to the price of the item and then make it read-only.

1. Expand Price data card.

2. Select the Data Card Value.

39 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

3. Select the Advanced tab and click Unlock.

4. Change the Default property in the Data section to: Text('Compare List
Gallery'.[Link],"$##,###.00")

5. Select the Price Field and change the DisplayMode property to [Link].

©2023 Microsoft Corporation 40 | P a g e


Power Platform App in a Day Microsoft Dataverse

Task 5: Configure the Approval Field


Let’s set the default value for the Approver to be the email address of the logged in user’s manager.

You will use the Office 365 graph to retrieve the manager’s email. You can find more about the Office 365 Users
Connection provider here Office 365 Users Connection Provider

1. Select Data sources. Click + Add data, then expand Connectors. Select Office 365 Users.

2. When prompted, click Connect

3. Select the Approver Data Card Value from the Tree view.

41 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

4. Go to the Advanced pane and Unlock.

5. Set the Default value to: User().Email This expression will use your user’s email, so you won’t accidentally e-
mail your manager to approve your testing.

In a real application or if you wanted to try the expression to use your managers email would be
[Link](User().Email).Mail This would make an API call at runtime to get the manager’s
email address of the logged-on user. If you try this and hit an error when calling the [Link]()
function, this may be because a manager is not set up in the system for the logged in Office 365 user. In that case,
you can simply go back go User().Email.

6. Save your work and return to the continue editing the app.

The Office 365 User connector has access to many other valuable types of information you can learn more about
the other actions and data available here Office 365 users Connector

©2023 Microsoft Corporation 42 | P a g e


Power Platform App in a Day Microsoft Dataverse

Task 6: Configure the Comment Field


1. Expand the Comments Field and select the DataCardValue
2. Set its HintText property to: “Enter justification.”

Task 7: Configure the Requested By Field


Let’s set the Requested By Field to be the current logged on user’s email and disable the control so the user cannot
change this value.

1. Expand the Requested By card.


2. Select the DataCardValue.
3. Go to the Advanced pane and Unlock the card.
4. Change the DisplayMode property to: [Link]

5. Set the Default value to User().Email


This is the email of the currently logged in user.

43 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Task 8: Configure the requested date Field


Let’s set the Request Date to be today’s date.
1. Expand the Request Date card.
2. Select the DateValue card.

3. Go to the Advanced pane and Unlock the card.


4. Change the DefaultDate property to Today()

Notice that the date in the calendar control will change to today’s date.
Now we will hide the Request Date card. We don’t need to show this Field to the user. Since we have included it as part of
the form the Field will get updated as part of the form submit.
5. Select the Request Date DataCard

6. Go to the Properties pane.

©2023 Microsoft Corporation 44 | P a g e


Power Platform App in a Day Microsoft Dataverse

7. Set the Visible toggle to Off.

Task 9: Add a button to submit the form


1. Select the Main Screen.
2. Copy (Ctrl-C) the Compare button from the first screen which has the correct color values.

3. Go back to the Compare Screen and paste (Ctrl-V) the button.

4. Make sure the button is larger – you can resize to 260 x 40 using the Properties pane on the right.

45 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

5. Set the button’s Text property to “Submit machine request”.

6. Rename the button to Submit Button.

7. The button should be enabled only if a machine is selected. To do this, change the button’s DisplayMode
property to: If(!IsBlank('Compare List Gallery'.Selected), [Link],
[Link])

Note: You might notice the exclamation mark (!) in the formula !IsBlank() Normally if you just have IsBlank() the
check is for blank. Adding the exclamation mark (!) in front of it changes it to check if it is NOT blank.

8. Next, we are going to configure what we want to happen when the button is clicked. Set the OnSelect property
to SubmitForm('Machine Order Form')

©2023 Microsoft Corporation 46 | P a g e


Power Platform App in a Day Microsoft Dataverse

When the button is pressed, the form data will be submitted to the Microsoft Dataverse.

9. Save your work and return to continue editing the app.

Task 10: Test the form


1. Select the Main Screen in the left side tree navigation and click Play.

2. Select a few machines to compare. And click Compare.

47 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

3. Select one of the machines.

Notice that the Title, Price, Approver, and Requested By Fields are already filled in.

4. Add some Comments, such as: “This machine will satisfy our needs.”
5. Click Submit machine request.

©2023 Microsoft Corporation 48 | P a g e


Power Platform App in a Day Microsoft Dataverse

The button should turn disabled (gray) for a few seconds while it’s submitting the request. If it does not do this
there is likely an error. Click the X in top right to get back to the design mode.
If there is an error, you will see a yellow error icon next to the Submit button, hover over it to check the error.

6. Exit the preview mode (‘X’ in top right).


7. Click Publish.
8. Select Publish this version and wait for the application to be published.

Task 11: Verify a new item was added to the Machine Order table
1. Open a browser window, go to Make Power Apps.
2. Select Tables.
3. Select the Machine Order table.

49 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

4. You should see a newly added row with your machine order details. This may take a few seconds to load.

©2023 Microsoft Corporation 50 | P a g e


Power Platform App in a Day Microsoft Dataverse

Task 12: [Optional] Navigate to confirmation screen after the Form


submit is successful
This step is optional, if you’re short on time you may skip it and continue to the next module.

Once the Form has been successfully submitted, it’s a good idea to show a confirmation screen and allow the user to
navigate back to the main screen.

1. Open a browser window, go to Make Power Apps.


2. Select Apps, select the Machine Ordering App, and click Edit.
3. Click + New screen -> Blank.

4. Rename the screen to Submit Success Screen.

5. Expand the Compare Screen.


6. Select the Form – you can use the tree view on the left to select Machine Order Form.

51 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

7. Set the OnSuccess property to: Navigate('Submit Success Screen', [Link])

8. Copy (Ctrl-C) the Header from the Compare Screen.


9. Go to the to the Submit Success Screen and paste the header.

10. Insert another label in the middle of the screen and set the Text to: "Your machine request has been
successfully submitted. Thank you."
11. Increase the font size, the size of the label and center the text.

©2023 Microsoft Corporation 52 | P a g e


Power Platform App in a Day Microsoft Dataverse

12. Copy the Submit Button from the Compare Screen and paste it in the Submit Success Screen.
13. Rename the button Success Button.
14. Change the Text of the Success Button to OK.
15. Change the Display Mode of the Success Button to [Link].
16. Move the Button to middle of the screen.
17. When pressed, the button should remove items from the CompareList collection and navigate to the main screen.
18. Set the OnSelect property of the button to:

Clear(CompareList);Navigate('Main Screen',[Link])

Note: ‘;’ is used a separator when multiple functions are called one after the other. If you are in a locale where ‘;’ is used as
a comma-separator, then use a double ‘;’ here (without the single-quotes).

19. Move the label up and add a Display Form: + Insert, search for display and select Display form.

53 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

20. Configure its data source to point to the ‘Machine Orders’ table.

21. Select the Fields to display: Machine Name, Price, Comments, Approver, Requested By, Request Date. Rearrange
and remove any additional Fields.

©2023 Microsoft Corporation 54 | P a g e


Power Platform App in a Day Microsoft Dataverse

22. Change the Snap to column value from 3 to 1.

23. Change the Layout from Vertical to Horizontal.

24. Set form Item property to 'Machine Order Form'.LastSubmit

55 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

25. Reposition/Resize the form until it looks like the image below. The Label will be first on the screen, centered under
the header. Then, position the view form to be centered under the label. Finally, the “OK” button will should be
centered at the bottom of the page under the view form.

26. Save your changes and Publish.


27. Select the Main Screen and click Play.
28. Select few machines and click Compare

©2023 Microsoft Corporation 56 | P a g e


Power Platform App in a Day Microsoft Dataverse

29. Select one of the machines, provide a comment and click Submit.

30. Verify that the confirmation screen shows the order details. Click OK.

57 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

31. The application will navigate back to the main screen and the compare list will be cleared.

32. Close the application.

©2023 Microsoft Corporation 58 | P a g e


Power Platform App in a Day Microsoft Dataverse

References
App in a Day introduces some of the key functionalities available in Power Apps, Power Automate, Power BI and the
Microsoft Dataverse. For an up to date list of learning references, see Power Apps Resources and Power Automate
Resources.

59 | P a g e ©2023 Microsoft Corporation


Power Platform App in a Day Microsoft Dataverse

Copyright
© 2023 Microsoft Corporation. All rights reserved.

By using this demo/lab, you agree to the following terms:

The technology/functionality described in this demo/lab is provided by Microsoft Corporation for purposes of obtaining your
feedback and to provide you with a learning experience. You may only use the demo/lab to evaluate such technology
features and functionality and provide feedback to Microsoft. You may not use it for any other purpose. You may not
modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell
this demo/lab or any portion thereof.

COPYING OR REPRODUCTION OF THE DEMO/LAB (OR ANY PORTION OF IT) TO ANY OTHER SERVER OR LOCATION FOR
FURTHER REPRODUCTION OR REDISTRIBUTION IS EXPRESSLY PROHIBITED.

THIS DEMO/LAB PROVIDES CERTAIN SOFTWARE TECHNOLOGY/PRODUCT FEATURES AND FUNCTIONALITY, INCLUDING
POTENTIAL NEW FEATURES AND CONCEPTS, IN A SIMULATED ENVIRONMENT WITHOUT COMPLEX SET-UP OR
INSTALLATION FOR THE PURPOSE DESCRIBED ABOVE. THE TECHNOLOGY/CONCEPTS REPRESENTED IN THIS DEMO/LAB
MAY NOT REPRESENT FULL FEATURE FUNCTIONALITY AND MAY NOT WORK THE WAY A FINAL VERSION MAY WORK. WE
ALSO MAY NOT RELEASE A FINAL VERSION OF SUCH FEATURES OR CONCEPTS. YOUR EXPERIENCE WITH USING SUCH
FEATURES AND FUNCTIONALITY IN A PHYSICAL ENVIRONMENT MAY ALSO BE DIFFERENT.

FEEDBACK. If you give feedback about the technology features, functionality and/or concepts described in this demo/lab to
Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for
any purpose. You also give to third parties, without charge, any patent rights needed for their products, technologies and
services to use or interface with any specific parts of a Microsoft software or service that includes the feedback. You will not
give feedback that is subject to a license that requires Microsoft to license its software or documentation to third parties
because we include your feedback in them. These rights survive this agreement.

MICROSOFT CORPORATION HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS WITH REGARD TO THE DEMO/LAB,
INCLUDING ALL WARRANTIES AND CONDITIONS OF MERCHANTABILITY, WHETHER EXPRESS, IMPLIED OR STATUTORY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. MICROSOFT DOES NOT MAKE ANY ASSURANCES
OR REPRESENTATIONS WITH REGARD TO THE ACCURACY OF THE RESULTS, OUTPUT THAT DERIVES FROM USE OF DEMO/
LAB, OR SUITABILITY OF THE INFORMATION CONTAINED IN THE DEMO/LAB FOR ANY PURPOSE.

DISCLAIMER

This demo/lab contains only a portion of new features and enhancements in Microsoft Power Apps. Some of the features
might change in future releases of the product. In this demo/lab, you will learn about some, but not all, new features.

©2023 Microsoft Corporation 60 | P a g e

You might also like