While working on a project, a client asked me about the various ways to display SharePoint list in Power Apps and how to get value from SharePoint list in PowerApps.
I researched some articles and collected a total of five different ways to show SharePoint list items in Power Apps. In this tutorial, I will tell you how to display SharePoint list in PowerApps, and Power Apps get specific item from the SharePoint list.
Also, we will discuss Power Apps get SharePoint list item by id with various examples.
Display SharePoint List in PowerApps
There are many different ways for a user to display the SharePoint list items in Power Apps. Many people can choose from these based on their requirements.
But in this tutorial, I will use five different ways where a user chooses the most in Power Apps. Such as:
- Power Apps Display Form
- PowerApps Gallery Control
- Power Apps Data Table
- PowerApps List Screen
- Power Apps Charts
1. Power Apps Get Specific Item from SharePoint List [Using Display Form]
We can use the Power Apps display form to display or view the specific SharePoint list record as per the needs.
Let’s take a simple scenario: I have a SharePoint list named “Travel Requests,” which contains the fields below.
Column Name | Data Type |
Trip Title | It is a default single line of text |
Destination | Location |
Airline | Choice |
Requested By | Person or Group |
Approved | Yes/No |
Travel Start Date | Date and time |
Now, I would like to display the SharePoint list items on the Power Apps Display form based on the Item ID [As the display form can contain only one item at a time].
Output:
To work around this, follow the below-mentioned steps. Such as:
1. On the Power Apps Screen -> Insert a Display form [+ Insert > Forms > Display form] and set its OnSelect property as:
OnSelect = 'Travel Requests'
Where,
- ‘Travel Requests’ = SharePoint Online list
2. As I want to view the SharePoint list item based on their ID, So I need to apply the below formula on the Display form’s Item property:
Item = First(
Filter(
'Travel Requests',
ID = 2
)
)
So, this is one of the ways that we can use to display the item (single item) in the Power Apps Display form.
2. How to Get Value from SharePoint List in Power Apps [Using Gallery Control]
Next, I will show you how to get value from the SharePoint list in the Power Apps gallery control. I will use the above SharePoint list [Travel Requests].
Next, on the Power Apps Screen, insert a Gallery control and set its Items property to the code below.
Items = 'Travel Requests'
Note:
Suppose you want to display a gallery item in a different layout. You can change the gallery layout. There are many different types of gallery layouts that you can use for different purposes.
Now, to get the specific field value and display it on the gallery control, select the Edit fields option, where you can select a specific SharePoint field and get its value, as shown below.
3. Power Apps Display SharePoint List Items [Using Data Table]
In this section, I will show you how to display all SharePoint list items on the data table. To work around this, follow the below steps.
1. On the Power Apps Screen, insert a Data table control and set its Items property as:
Items = 'Travel Requests'
2. When you provide the list name to the Power Apps data table, all the SharePoint columns and records will appear in the table. Once you unlock all the columns, you can design the table using its various properties.
3. Once you have completed all your updates, Preview the app. The data table control displays each record from the SharePoint Online list.
Have a look at the below screenshot for the output.
4. Power Apps Get Data from SharePoint List [Using List Screen]
In this example, I will show you how to get data from the SharePoint list using the list screen. To achieve it, follow the below steps.
1. On the Power Apps app -> Expand the + New screen dropdown and select List template screen, as shown below.
2. Now, select the TemplateGalleryList and set its Items property as:
Items = 'Travel Requests'
This way, you can work with how to get data from the SharePoint list using the list screen.
5. Power Apps Get Field Value from SharePoint List [Using Charts]
Finally, there is another way to use some Power Apps Charts (like Column, Line, or Pie Charts) to show all the SharePoint List records or values.
To work with the various Power Apps Charts, you can refer to the below Power Apps tutorial
Read - Power Apps Charts
Power Apps Get SharePoint List Item by ID
In this scenario, We will discuss how to get SharePoint List items based on the item ID in Power Apps.
Here, I have taken a Data Table and a Text input control that helps to enter the item ID value by the user. For example, If a user enters the SharePoint list ID 3, then I would like to filter and display the item details (of ID 3 only) in the data table.
To achieve this, Insert the below code on the Data table’s Items property as:
Filter(
'Travel Requests',
ID = txt_IDValue.Text
)
Where,
- txt_IDValue = Power Apps text input control name
Now, Save and Preview the app. In the text input control, enter the list item ID (the details that you want to display in the data table). Then, you can see the filtered result in the data table, as shown below.
This is how we can work with the Power Apps get SharePoint list item by ID.
Some more articles you may also like:
- Power Apps Lookup SharePoint List
- Power Apps Rating Control
- Power Apps First, FirstN, Last, and LastN functions
- Patch Power Apps Collection to SharePoint List
- Power Apps Show Image from SharePoint List
- Power Apps Start Timer On Button Click
- PowerApps Navigate to Another Screen
I trust this Power Apps tutorial is useful for you. If you have any related requirements to how to display the SharePoint list in Power Apps, you can follow the above 5 different ways to do it.
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com
Hello Bijay,
Do you have a documentation on how to include dynamic Photo Attachment from the generated PDF from PowerApps?
I’ll just created an HTML from PowerApps then call PowerAutomate to create/convert the HTML to PDF with the information i need. But then we need to include the attachment photo from the sharepoint list i have.
Thanks in advance
Dell