powerapps banner

This is the Part 2 of the Microsoft Business Application Platform series.

Part 1 – Microsoft Business Application Platform – Part 1 – Overview.

In Part 1, I talked about problem and in this article I will discuss how we can solve the problem using PowerApps.

First of all, Sign up for PowerApps

Creating an Environment

The latest version of PowerApps includes support for Environments.  You can create different environments for your DEVELOPMENT, TEST, UAT, and PRODUCTION environments.

To do this, we need to open the Admin Center – https://admin.powerapps.com

Click on + New Environment button.

Enter a Name, select a Region, tick Create a database for this environment checkbox, select an access level, and click Create an environment button.

Note: If you the Create a database for this environment checkbox untick the database for the Environment will not be created.  But don’t worry, you can create this later.

Create Environment
Create Environment

Managing Common Data Service

Now we can start creating and updating Entities in Common Data Service from https://web.powerapps.com

You can switch environment from the top menu.

Switch Environments
Switch Environments

Create an Entity and Fields

If your database in CDS is not created, you can create it as below.

Click Common Data Service > Entities

Click Create database

A database will be created based on the standard Common Data Model (CDM).

Create CDS Database
Create CDS Database

Once the Entities are created, it’ll look like this.

CDS Entities
CDS Entities

For our PowerApp, we could use one of the OOTB entities such as Case.  But to demonstrate how to create a new entity and fields, I am going to use a custom entity.

To create an Entity, click on + New Entity button.

Populate the required fields and click Next.

Create Entity
Create Entity

Click Create.

By default, 5 system fields will be created.

Create Entity - Step 2
Create Entity – Step 2

The custom entity is now created.  Click on the … to see some of the available actions.  You can;

  • Open Entity in Excel
  • Import and Export Data
  • Export Template
  • Duplicate Entity
Custom Entity Created
Custom Entity Created

Now we can create some new fields.

Click on the newly created custom entity Maintenance Requests.

Click Add Field button.

Create Field
Create Field

Populate the Display Name, Title, and select a Type.  Currently, below types are included.

  • Address
  • Autonumber
  • Boolean
  • Currency
  • Date
  • DateTime
  • Email
  • Guid
  • Integer
  • Multiline Text
  • Number
  • PersonName
  • Phone
  • Picklist
  • Quantity
  • TextWebsiteUrl

In this example, I have selected Text type.  Click Save.

Create Field Step 2
Create Field Step 2

Create all required fields.

Create a PowerApp

Now that we have an entity to store data, let’s create a PowerApp.

Click on the + New app button.

Create a PowerApp - Step 1
Create a PowerApp – Step 1

You can create a PowerApp using two different tools.

  1. PowerApps  Studio for Windows
  2. PowerApps Studio for Web

In this example, I am going to use PowerApps Studio for Web.

Create a PowerApp - Step 2
Create a PowerApp – Step 2

The direct link to the PowerApps Studio is https://create.powerapps.com/studio/

You can start creating a PowerApp multiple ways.  You can start from scratch or from a data source.  In this example, let’s start from Common Data Service data source.

On the Common Data Service tile, click on the Phone Layout button.

Create a PowerApp - Step 3
Create a PowerApp – Step 3

Select the Entity we just created and click Connect button.

Create a PowerApp - Step 4
Create a PowerApp – Step 4

PowerApps Designer launches.  PowerApps will automatically build a 3 screen app for you.  PowerApps Designer looks like a cross between Excel and PowerPoint.  On the left hand pane, you can create screens.  On the top there’s the Formula Bar.  Left of the Formula Bar, you see the Property drop-down list which shows properties of the selected control.  In the middle you have the Design workspace where you can design each screen.

PowerApps Designer
PowerApps Designer

You can now test your PowerApp by clicking the PLAY button on the top right.  You can create records, view lists of records, and edit records.  So far, we haven’t written any code or even written any formulas.

In Part 3 of the series, I’ll be customising this PowerApp with branded styles and more screens.

Stay tuned…

You can watch the below video Create your first app using CDM | Microsoft Common Data Model from MS PowerApps to see the steps in action (Note: There may be slight differences due to updates to CDS and PowerApps)

 

 

Microsoft Business Application Platform – Part 2 – Building an App using PowerApps

Leave a Reply