How to get rid of that pesky GUID in your PowerApp

This is a common problem with PowerApps that isn’t immediately evident to someone who may be a citizen developer. You want to create an app to view or edit the data you have stored in SharePointDynamics or some other connection that you have made. But why do the Lookup columns or fields display the GUID?

GUID example

It is a simple fix that just takes some experience in PowerApps to Master.

As an example, I will walk through this issue with Opportunities data from Dynamics 365.

1.  To start, go to PowerApps and click “Create an App.”

Create an app

2. From here, you will be asked to choose your data source, if you don’t find your data source, Microsoft might not offer an out of the box app for it. You should still be able to get connected by starting from a blank app or using a Dynamics or SharePoint data source as a template and substituting your data source in for it. I’ll cover this in a later blog.

Choose your data source

3. After selecting your data source, you will need to specify what environment this data is in, as well as what table you would like to pull from.

Connections - dataset

In this scenario I am connecting to “Opportunities” from our production environment of Dynamics 365.

Opportunities from Dynamics

4. Your app will be built automatically by PowerApps! Sit back and relax…for the time being.

Building your app

After your app has been created, you may notice that some of the fields are an incoherent mix of numbers and letters. This is a GUID and means that there is a lookup field in our data! Not to worry, we can fix this.

GUID

 

 

 

 

This happens because we only are able to specify 1 connection when creating the app, and the lookup values on the opportunity entity stores the GUID for Accounts and Contacts, not the friendly names.

5. To fix this we need to add connections for the Account and Contact entities or tables.

The first step is to click “View” from the top menu of our app and then “Data Sources.” This will flyout a menu with a list of all our sources.

Data Sources

As you can see, “Opportunities” was our only option so we need to click “Add data source.” From there, we can add the Accounts and Contacts from Dynamics 365 as our Data Sources.

Add Data Source Add Accounts  Add data

6. After adding the Accounts as a data source, now we can go to the PowerApp to edit the field that is using the GUID. To make this a friendly name, we use the Lookup() function to lookup to the Account entity or table. In our scenario, the formula is as follows: Lookup(Accounts, accountid = ThisItem._parentaccountid_value, name).

This formula basically says “Lookup to the Accounts table, where you find a match in the Account ID to this items’ Parent Account ID, return the Name of the Account.” Pretty straight forward, but if this is your first go around with PowerApps – it might not come very easily.

Account lookup

7. Now, do the same for contacts – and there you have it!  No more GUIDs!

Account Lookup 2

PowerApps Checklist: 10 Things you need to know before getting started

Are you are getting ready to build your first PowerApp? Here is a list of what you should know before you begin:

  1. Do you know your data source?
    • This is an important question, and you guessed it, because of licensing… but I will get to that at a later point. PowerApps has nearly 300 connectors, which can be found here. A decision needs to be made on where you would like to store your data. Common storage locations are SharePoint, Dynamics 365, Excel and Common Data Service (CDS)(Link to blog about what CDS is).
    • Your data source could also determine what type of app you can build. With the Common Data Service, you can build model driven apps which are designed around business functions and business processes.
  2. Do you need a custom connector?
    • If you do not see your data source in this list of connectors, you may need to build your own custom connector. With a custom connector, you will be able to bring data into your PowerApp just like the out of the box connectors.
  3. PowerAppsWhat license is needed?
    • Depending on what connector you need for your data, you can use PowerApps for O365, P1, P2, or Dynamics 365 licenses.
      • If you have O365, you will be able to use PowerApps at no additional cost if your connector is on the list of free connections. Some of these include: SharePoint, Excel, and OneDrive.
      • If you are an end user that needs to connect to a premium data source, such as Common Data Service, you will need a P1 License.
      • If you are an app builder that needs to connect to a premium data source, such as Common Data Service, you will need a P2 License.
      • If you are already using Dynamics 365, you will inherently have a full PowerApps license for no additional cost.
  4. On what device will users be accessing the app?
    • The decision here is an important one for usability. If most of your users are out in the field and will be using the app on their cell phone, you should build the app in “portrait” mode. If users will be accessing on their desktops, you should build the app in “landscape” mode.
  5. Do you need any workflows?
    • Flow is the preferred choice for running any workflows based upon data in PowerApps, and O365 in general. Make sure to document these workflows as part of the beginning stages of any project. With Flow, you will have access to the same connectors used in your PowerApps,plus handy connectors like Approvals, which are easy ways of generating email approval workflows.
  6. Do you need custom branding? Or can you get away with an out-of-the-box theme?
    • When you create PowerApps, you are easily able to switch between the out of the box themes that are made available from Microsoft. But sometimes, they might not fit the branding you are looking for. Currently, you are not able to make a custom PowerApps theme. If you will need a lot of custom branding for your PowerApp – you may need to budget more time for the creation of your app.
  7. Do you need to report on your data?
    • If you need to report on your data, the best place to do so would be in PowerBI. You can create powerful visuals based on the same connections that you have used to create your app. So no matter whether the data is in SharePoint, CDS, Dynamics, Excel, or any 3rd party connectors, you can get powerful insights.
  8. Who will manage the PowerApp?
    • A very important question. When change requests inevitably happen, who takes ownership of those changes? Is it IT or a power user within the team? PowerApps is designed for power users to be able to handle much of the workload, but it is still a great idea to have an IT member or external consultant with more expertise on call.
  9. Who will train end users?
    • The great thing about PowerApps, is that they can be designed in a way that is intuitive to users. Of course there will still need to be some training. Outlining who should be conducting the training is crucial so that users don’t get left behind. Poor user training generally leads to weak user adoption.
  10. Get familiar with the PowerApps roadmap
    • This is important to check every so often due to the steady rollout of new features coming from the PowerApps team. By checking the roadmap here, you can see the new features coming down the line that might solve the need you are looking for, or provide a more usable feature for your end users.

Canvas vs Model-Driven PowerApps

There has been a lot of buzz about PowerApps lately, some of which has involved a new type of app available for creation called a Model-Driven App. This post will explain the benefits and differences between canvas-based and model-driven apps.

Canvas Apps

Canvas-based apps have been around since PowerApps first came on the scene roughly 2 years ago. Design custom apps by dragging and dropping elements onto a canvas, just as you would design a slide in PowerPoint. You start by designing a User Interface for your app (in a PowerPoint design, Excel formula functionality type of way) and connect it to the data available through many of the out of the box connectors (or if you’re feeling ambitious you can create your own). The great thing about canvas apps is that you can connect to most of the data sources that are included in your O365 license.

These apps are great for:

  • Pulling multiple data sources together into one app
    • Data from SharePoint lists, Dynamics 365, Office 365, SQL databases, and many more can be combined into one user interface
  • Creating a completely custom UI
  • Providing a user friendly – mobile-first application for your users
  • More flexibility with development of functions and controls

One thing to keep in mind with canvas-driven apps, you need to already have your data sources created or in production in order to build the framework of your app. For example, see the screenshot below of a canvas app:

Model-Driven Apps

Model-driven apps are relatively new to the Power World. Model-driven app design doesn’t require code and the apps you make can be simple or very complex. With model-driven apps, much of the layout is determined for you and largely designated by the components you add to the app. If you are familiar with Dynamics 365, you have been working with model-driven apps and you haven’t even realized it! The Dynamics 365 platform has been integrated into the Common Data Service or CDS. This essentially means Dynamics 365 and CDS are one in the same. You create the entities and data structure for your apps while you are building them. Keep in mind, to use CDS you must have an additional P1 or Dynamics license on top of your O365 license.

These apps are great for:

  • Creating your data source from scratch
    • Entities, tables, relationships, fields
  • Grouping business or use case functionality together into one app
    • For example, a client check-in app, where a customer service representative has a model driven app that groups the functionality they need together in one app
  • Business process flows that guide users through a common business process
  • The unified client interface means your app will look the same whether it is being viewed on a phone, tablet or desktop

Look at the screenshot below for an example of a model driven app (those of you Dynamics 365 users may realize that this is quite like the Unified Client Interface… that’s because they’re the same thing):

You can’t go wrong with building either type of app, but you may want to read my PowerApps Checklist blog here to help decide which way to go.

If you are interested in PowerApps, have a question or have an idea of how to improve some of your business processes, feel free to reach out or leave a comment. I’m happy to help!