Skip to main content

Pull in related list items using a customized PowerApps list form

PowerApps is a great way to easily customize the new, edit, and/or display forms of list items in SharePoint online. In some cases you may also want to pull in items from another list with items related via a lookup column. In this blog I will discuss the steps to use a gallery control to pull in these related items.

This blog assumes that you have a working knowledge of using PowerApps to customize a list form, if not you can view some information on getting started with PowerApps here: https://powerapps.microsoft.com/ro-ro/blog/microsoft-powerapps-learning-resources/

Starting with a PowerApps customized list form, from the PowerApps canvas select 'Insert' from the ribbon and select one of the Gallery controls. I'll be using Vertical for this demo.


From the Data pane select add data source to connect to the list you would look to pull in data from. Note: This can be any list or library in SharePoint so while lookup columns are site specific if you use something like Flow to relate items via the ID you could also pull in those items via the same method.

The next step is configuring the Items returned in the Gallery, you can do this by selecting the 'Items' property of the control and configuring the filter function as follows:

filter(list,filter criteria)

  • where 'list' is list you would like pull data from
  • where 'criteria' is the name of the column you would like to filter on, in this case it is the id value of a lookup column called projectLookup, equals the id of the current item in the display form. The current item of the display form can be pulled in using 'SharePointIntegration.SelectedListItemID'
    Note: Lookup columns are non-delegable and may not work with larger data sets, to find out more about delegable data sets check out this post: https://blog.mslavieri.com/2019/02/powerapps-delegation-warning.html



The Gallery is now set up to pull in all of the related items in the list from that list. The Gallery control will repeat each of its sections for as many items that are returned. You can customize the Gallery by pulling in different controls or text boxes into one of the repeating sections to customize the Gallery in whatever way you want. If you want to display item properties for the items pulled in you can select 'Fields' in the Gallery pane and select the value you would like for each control. 


This is effectively a UI to update the value in the text property of the control. If you click into a control and select the text property you will see that it has been updated to ThisItem.itemproperty


By knowing this you can use the item's properties to do some unique things such as navigate to the display or edit form of the item like I am doing for the 'Track' button that was added to the Gallery. 


That's it, hopefully you found this guide helpful, if you have any questions ask them in the comments or reach out on twitter @mslavieri

Comments

Popular posts from this blog

PowerApps Delegation Warning

Update Aug 15 2019 - Microsoft has updated PowerApps to allow for some complex SharePoint data delegation, this will hopefully resolve most issues you were seeing when working with SharePoint data: https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/

If you've tried to use the Filter, LookUp or Search actions in PowerApps you have seen the yellow warning error that shows a 'delegation warning' and you might have even ignored it because your PowerApp was working fine in testing. However once you get into larger data sets your PowerApp will have some issues so in this blog I will attempt to explain what the delegation warning is and how you can fix your PowerApp.

Delegation So what even is Delegation in PowerApps? When doing any sort of data manipulation for an app, PowerApps will try to push the processing of that data to the source system instead of doing all of the manipulation in the app. This is done to increase the efficiency of your app and r…

Getting started with Self Service Support in O365 with Learning Pathways

One thing that comes up in every O365 rollout is the need for employees to have some sort of self-service support in O365. In the past this would mean the learning and development teams would have to create artifact on artifact of material to help employees find the answers they are looking for. Now in Office 365 Microsoft has created a custom learning module to address this need. The learning pathways solution can be customized to the app mix that is used by your organization and brings in the relevant Microsoft resources into an app in your tenant. Provisioning Learning Pathways The learning pathways solution will provision a SharePoint application and will require a SharePoint App Catalog. If you do not have an App Catalog in O365 and one will need to be created. You can install the learning pathways solution in one of two ways, the first is to use the pnp provisioning service (recommended), which will automatically create and set-up the site collection. The second option is to ma…

O365 Weekly Digest - 01/28/2019

Every week I'll be posting a quick summary of O365 updates included in the admin weekly digest email that you can sign up for via the admin Message Center: https://admin.microsoft.com/AdminPortal/Home#/MessageCenter -these emails include items posted to the message center over the last week and come out every Monday.
Lots of updates and reminders to some already talked about features this week. The one I am most excited about is the new site branding and mega menu navigation (Roadmap IDs 33131, 33132, 33138, 43781). The rollout for this feature was pushed back a bit but is now rolling out. There has also been a delay in the rollout for SharePoint reminders based on date fields (Roadmap ID 34267), and the new icons for the waffle which are rolling out soon as well (Roadmap ID 45441).

The updates this week also sent reminders for the Planner Notifications in a Teams activity feed that was covered last week (Roadmap ID 45878), as well as the opt-in toggle for try the early version of…