1

Canvas apps: How to build your own custom, low-code apps

 1 week ago
source link: https://www.pluralsight.com/resources/blog/software-development/buidling-power-apps-canvas-app
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to build your own custom, low-code apps

Do you ever find yourself thinking, “We need an app for that”? Well, with Power Apps, you can create your own apps, even if coding isn’t your jam. The Power Apps platform is all about enabling “citizen developers” to build business apps and automate processes without needing deep technical skills.

In this article, I’ll walk you through how to build your first Power Apps canvas app. We’ll pretend you’re part of the Party Planning Committee at your office, and you need an app for creating and managing events. Let’s get started!

Setting up a data model in Dataverse

Now that we have a solution to hold our changes, we can get to work on our data.

Apps in the Power Apps platform can pull data from a variety of sources, including Dataverse (the built-in data layer), Excel, SharePoint and even SQL. Let’s keep things simple and go with Dataverse.

For our scenario, we’ll need two different tables (sometimes called entities). These represent the “objects” of the application, and make up what’s called the data model (the tables, columns and relationships that drive the app). Specifically, we’ll need one table for “Event” and one for “Contact.”  “Event” will need to be a custom table, but for “Contact,” we can use the out-of-the-box Contact table.

Here’s a look at the data model we’ll be building.

You’ll also notice the pink arrow between the tables. That represents a relationship, which we’ll cover in a little bit.  For now, let’s build out the custom Event table.

Creating a new table in Dataverse

After creating your solution, you should automatically be taken to it. But at the moment, it’s an empty solution—no tables or anything else. Let’s fix that. (You can also get some help from Copilot on this part if you’d like).

On the left-hand navigation, click Tables.

When you click into Columns, you’ll see there’s actually a lot of stuff on the screen—but not stuff we created. A new table will have quite a few default columns—things like Created By, Created On and more.

I’ve highlighted one column in particular, which is Name. This is the primary name column. All Dataverse tables will have one of these.  This is the name or primary description of the record, and will be shown in list views and so on. I point it out because it means we won’t need to create our own column for the event name.

But we DO need to create columns for:

  • Event Type (the kind of event, like Birthday Party, Holiday, Team Building, etc.)
  • Event Date and Time (the date and time of the event)
  • Event Location (where the event will be held)
  • Event Organizer (who’s organizing the event)

To create a new column, click + New column on the command bar.

Click Save.

Now we need to create the next two columns. In the list below, I’ve included the display name to use, as well as the data type. Go ahead and create these columns using steps similar to what we did above.

  • Event Date and Time, data type of Date and time (defaults for everything else)
  • Event Location, data type of Single line of text (defaults for everything else)

Creating relationships between tables in Dataverse

Before we create the final column for Event Organizer, we need to talk about relationships.

Remembering back to our data model from earlier, the Event Organizer will be represented by the built-in Contact table/entity. But we need a way to “connect” those contacts to our events. That’s done by creating a relationship between the Event table and the Contact table.

To create these types of relationships, you have two choices:

  • Add a Lookup (a type of column) on the “Many” side that points to the “1” side; this will automatically create the relationship behind the scenes
  • Create the relationship manually

The first option of the Lookup column is the easiest, so let’s do that.

For this, we’ll want to start in the Event table. By adding a Lookup column that points to Organizer (Contact), we’ll create a many-to-one relationship, Event-to-Organizer (many events can have the same 1 organizer).

Make sure you’re in the Event table, and click + New column.

Amber Israelsen

Amber I.

Amber has been a software developer and technical trainer since the early 2000s. In recent years, she has focused on teaching AI, machine learning, AWS and Power Apps, teaching students around the world. She also works to bridge the gap between developers, designers and businesspeople with her expertise in visual communication, user experience and business/professional skills. She holds certifications in machine learning, AWS, a variety of Microsoft technologies, and is a former Microsoft Certified Trainer.

More about this author

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK