PowerApps CDS: Understanding The Basics And The Environment Setup

by | Power BI

In this tutorial, we’re going to talk about PowerApps CDS or common data service. This is important because any model-driven app performs better if it runs through a common data service.

A common data service is a data layer between all of the input data that power your applications.

In any organization, data usually comes from different sources. If you run a store, for example, you have data coming from your point of sale system. You’ll also have data coming from your QuickBooks or any other accounting software, as well as from your vendor purchases.

You’ll then have one layer that holds and takes in all of that data so that you can effectively power up any application. This is what a CDS does.

It’s quite different from what database administrators would call a data layer. A PowerApps CDS is a mix of a data storage and data layer.

Benefits Of PowerApps CDS

Working with CDS comes with a number of benefits. You can check out the Microsoft PowerApps documentation to see how it would work with your setup, but we’re going to highlight four of the most important benefits here.

First Benefit: CDS standardizes all of your data.

With a common data service, all of your data is in place. There’s no need to go to your accounting software to get one piece of information, then to your POS software for another piece of data. This is why huge organizations that normally work with large amounts of data prefer using CDS.

CDS also use standardized columns and field types, allowing you to organize data more efficiently.

Second Benefit: CDS lets you apply business rules.

Business rules allow you to set parameters that should be followed every time any kind of data is added.

For example, you can set a rule that an employee number needs to be attached to any employee information that will be added to the form. Or if a store is serving alcohol, you could require an alcohol license ID to be given before the sale is approved.

These business rules will always apply up to the data layer, and not just on the app layer. This means that no matter what happens, the business rules will always be followed.

Third Benefit: CDS adds a layer of security.

Microsoft has always been known for their security. You won’t even need a database administrator or a data security expert once you use CDS. You can easily control which tables, rows, and other parts of the data specific people can have access to.

For instance, if you’re going to give your vendors access to your app, you wouldn’t want them to see your sales data. You’d want to limit their access to the purchase data specific to each vendor. This is something you can apply through CDS.

Fourth Benefit: CDS automatically backs up your data.

Backing up data is something that a lot of people often forget about. The bad thing about it is that you only realize the importance of regularly backing up your data until you actually lose it.

The good news is that CDS automatically backs up your data for you. No matter what happens, you can expect your data to be safe in the cloud.

Setting Up The Environment And Database

Let’s start building a common data service. Step one is to set up the environment and the database.

If you’ve set up your PowerApps environment the same way I have, you would need to do provisioning before you can build your database.

You’ll know that this is the case if you go to Data on the left pane, click on Entities, and see this message in the middle saying that the current environment that you’re in does not support the creation of databases.

powerapps cds

PowerApps is asking us to do this because as mentioned earlier, CDS is not just a data layer; it’s a form of data storage as well. Think about it as something similar to Dropbox, OneDrive, or any sort of SQL server. It’s going to need a database where it can store all of the data on the cloud.

So what we need to do now is to create a new environment first. Let’s click “Create a new environment” and call this environment CDSTutorial.

It will require us to pick a region from this dropdown list.

powerapps cds

Since we’re just testing this out for now, we’ll choose a trial version and not a production environment.

Once we’re done with all of that, let’s click “Create environment” on the lower right corner. It usually takes a few seconds for the next pane to load after you click the button.

powerapps cds

Once it loads, it will ask us if we want to create a database. It will show a list of the things we can do once a database is created.

Since we want everything on that list to happen, let’s click “Create database.”

It’s going to ask us for a currency first, so let’s choose USD for this example.

powerapps cds

The language has also been set to English by default, but you can change this by clicking on the dropdown in case you want your database to be in a different language.

Let’s include some sample apps and data as well by ticking on the box just so we can see how things look like.

powerapps cds

Once all of those fields have been filled out, let’s click “Create my database”.

Creating the database normally takes a few minutes to finish, so expect a little wait time at this point. In case you’re wondering if you’re on the right track, it should show a message that tells you it’s currently building the database.

powerapps cds

***** Related Links *****
Power Apps Introduction: Definition, Features, Functions And Importance
Power Apps Environments: Setting Up The App Elements Properly
PowerApps Functions and Formulas | An Introduction


Using the PowerApps CDS definitely makes things work more efficiently, especially if you’re pulling data from various sources and planning on applying the data to different applications.

Of course, building the database and the environment is just the beginning. In future tutorials, we’ll be talking about the other aspects of common data service to help you truly understand how it works.

All the best,


Related Posts