Introducing support for lookups and a new sample app

If you haven’t done so already, upgrade PowerApps Studio to the latest Windows store build to take advantage of some great new feature additions.

Quick overview

Build 2.0.440 brings in three key additions:

  1. Options and tools rights side panels are now merged into one experience. In the new right side panel, you always see the relevant set of options for the object you select on the canvas. When you select an app screen, for example, you can use the options panel to add data sources to the app. When you select a form, you can use the panel to select the fields to use from the data source.  Panels like Share, Advanced and Flows open on top. You can dismiss them anytime and automatically get back to the options panel.
  2. A new Lookups Control is now available to use on your forms, and it comes all wired in when you create an app from data. You can further configure the field to display from the lookup list.
  3. Our newest sample app called Showcase is ready to try out! The functionality is focused on presenting assets, products or events. Take a look on the great design language and layouting ideas.

Introducing support for lookups

Starting with build 2.0.440, PowerApps now supports lookups. What do lookups mean in PowerApps, and why are they important?

  • Data in an enterprise is large and complex. Every entity that your app is using is likely to have relationships with other entities. For example, a list of orders consumes information from a list of products. Lookups are the primary way such business data comes together.
  • Lookups make it possible to go beyond the key/unique identifier in the current entity and bring all the information needed into context. For an order, lookups can bring all the information needed about a product such as product pictures, specifications, manufacturer details, etc.

Let’s get a quick overview of how lookups work by showcasing a SharePoint list. With SharePoint we have three primary types of lookups:

  • Choice
  • Lookup to another list
  • Person or group

We’ll review the specifics of each and consume them in an app that we’ll create right in PowerApps by choosing starting from data.  I’ll further showcase how to configure lookups inside of a form.

image

To build the application I took the following steps:

  1. Open PowerApps Studio. (New to PowerApps? Go to https://powerapps.microsoft.com sign up for free using your organizational email address and follow the instructions to download PowerApps Studio from the Windows store)
  2. Choose New –> ”Create app from data”
  3. Choose a custom list from your SharePoint site. Connect to a SharePoint Online account if you haven’t already.

​Here is a short video to follow along:

Note: Expect lookups to work for any relational data source such as CRM, SQL on Azure, etc to work the same way they work for SharePoint.

As a next step, let’s take a quick look at the data used to showcase lookups:

I have a SharePoint custom list called Assets that has all these types of lookups above. Let’s take a look at the schema:

image

Let’s imagine this asset list is used to track hardware equipment in a team. Since they get broken from time to time, we use a Repair Shop list to track various local shops we can work with to get them fixed.

I’ve captured below how the two lists look like in SharePoint:

image

Now that the app is generated, let’s take a look on how the view details screen looks like for the three lookup fields.

The “AssetType” field shows the choice as expected, the “RepairShop” lookup shows the email address as configured in SharePoint, and the “CurrentOwner” lookup shows the JobTitle.

image

Let’s make the CurrentOwner field display Name rather than JobTitle. This is just as easy as choosing a different field from the dropdown:

  1. First, I’ll switch into the Advanced panel. (In the future you’ll be able to do so right in the main options pane; right now the setting does not persist, it is something that we are actively working on). Choosing the display column works the same in the main panel and Advanced.
  2. To access Advanced properties, we need to unlock the card by clicking the Unlock button
  3. Next, go all the way to the Value property and choose the desired display field. I’ll choose “DisplayName” instead of “JobTitle”

Now let’s review the editable lookup control. Similarly to the above, you can change the desired field to display in the editable control. For lookups that you just want to display, the right-side pane gives you the option to swap from an editable lookup to a view-only lookup.

image

image

Lookups outside the context of a form

There are additional lookup scenarios that your apps may need. For example, you may need a full screen lookup experience for complex data, and you also may need to nest a lookup inside of a gallery.

For lookups nested in a gallery, here are the steps to take:

  • Select the label that shows uniqueId you want to perform the lookup on.
  • If your entity to lookup on is directly wired in your datasource as a lookup (or foreign key) simply use <entityName>.DisplayName.Value
  • If your entity to lookup is an external datasource, first added to the datasources. Further on, use the lookup function to get the desired field from the related entity.

For lookups as a full screen experience that links into a form the steps are:

 

  • Add a new screen to the app by choosing one of the gallery layouts.
  • Bind the gallery to the lookup entity.
  • Use the gallery.Selected property to read back the value selected by the user.

Known issues with the lookup control

There are a couple of improvements we are working on. Expect them to light up in the upcoming builds:

  • While the control performs the lookup search it shows “displaying 0 results” rather than “searching data”
  • Entities like People require the user to first type a letter to populate with suggestions, need to further update the status bar accordingly.
  • The right side panel does not persist the value chosen for the display field. Workaround: use the Advanced panel to set the desired display value.

Product Showcase sample app

We just added a new sample app called Product Showcase. This app is a great example of how to create an engaging, concise marketing presence for your products, company, or events. You can easily add videos, images, descriptions and more—and then quickly share it all with your customers. You can run this app from our website with sample data. In the next few weeks, we will be adding more sample app scenarios for you to explore.

Have an app scenario that you would like to see in a sample? Let us know by submitting your idea via our community page.
image

Learn more and join our community

With latest release, PowerApps is helping you reach deep into your data via lookups, and the app from data featured does all the work to wire in related entities for you! Our unified new right side panel enables you to quickly choose the fields you want to display and get you ready to share with your team the app you’ve just created.

There are many ways you can expand your app from this point. Please check out our documentation and learn about some of the advanced customizations you can do on forms and large set of connections available to use. 

  • Have a question? Please don’t hesitate to connect with us on our PowerApps Community we’ll help you right away.
  • Need a feature? Please make your voice heard on PowerApps Ideas, we value your feedback.

Last but not the least, please share your feedback from within PowerApps. Send all your “frowns and smiles” as you create and run your apps. We would love to hear out from you!