Are you a Power Apps Beginner? Even also if you are not a beginner, Do you hurry about how to display SharePoint List items in Power Apps? Do not hurry, check out this article to perform this requirement in a simple way.
In this Power Apps tutorial, We will discuss how users can show their SharePoint List items in the Power Apps app. Also, We will see these below things:
- What are the various ways to show SharePoint List Items in Power Apps
- How to get SharePoint list item by ID in PowerApps
Let us discuss an example. Suppose there is a SharePoint List named Event Itinerary. This list has various columns with different data types as:
- Session Name = Single line of Text column
- Session Code = Single line of Text column
- Session Type = Choice Data type
- Speakers = Person or People picker column
- Start Time = Date Time column
- End Time = Date Time column
Also, this SharePoint list has some records and I want to display all these records in Power Apps. Refer to the list in below screenshot:
- There are many different ways where a user can display the SharePoint list items in Power Apps. Many people can choose many ways based upon their requirements.
- But in this tutorial, I can use five different ways where a user chooses the most in PowerApps. Such as:
- PowerApps Display Form
- PowerApps Gallery Control
- PowerApps Data Table
- PowerApps List Screen
- PowerApps Charts
Add SharePoint Connector to the app:
- There is one most important thing a user should know while working in PowerApps. Whenever a user is going to display SharePoint list in PowerApps form, gallery, or a data table, first of all, he/she must be ensured to connect the SharePoint Data source to the app.
- If the SharePoint list data source has not connected to the app, then nothing will display in those controls and also an error will occur.
- To avoid this situation, before applying any formula to any PowerApps control, do not forget to connect the data source in any time. As in this scenario, We are using a SharePoint List, So we will connect the SharePoint Connector.
- Those who are using Excel, OneDrive or any other connectors, in that case, they should connect that specific connectors to the app.
- Follow the below instructions to connect the SharePoint List to the app:
- Go to the View tab (on top of the page) -> Data sources -> Click on + Add Data button -> Search SharePoint as shown below.
2. Next, if you have already an existing SharePoint connection, then you do not need to connect the data source again, otherwise, you need to create a new connection by using the +Add connection option. You can create the connection by giving your Microsoft credentials.
3. If there is an existing SharePoint connection, then next you need to connect a SharePoint Site where the specific SharePoint List is present. Then, Choose the SharePoint List (Event Itinerary) that you want to connect in the app and tap on the Connect button. That’s it. Now you can see the list has been added to the app as per the below screenshot.
This is how we can connect the SharePoint connector to the PowerApps. Not only the SharePoint, but also we can do the same process for all connectors like Excel, OneDrive, etc.
Read Customize SharePoint List Forms with PowerApps (Step by Step)
Below represents the detailed scenarios of all different ways.
- By using a Power Apps Display form, we can only view the SharePoint record that you want. Let’s see in the below scenario.
- Here, In the PowerApps display form, I want to display the SharePoint list item based upon the item ID. As the display form can contain only one item at a time.
- To add the form, go to the Insert tab -> Forms -> Select Display as shown below. Once you will click on it, then the form will add in to the app with the blank data source.
- Next, we need to add the SharePoint list name to the Display form DataSource property as:
DataSource = 'Event Itinerary'
- When you will set the list to Datasource property, you can see all the SharePoint field has been retrieved from the SharePoint list and display in the form.
- All these SharePoint fields will not work until and unless you unlock the Data card of each field. To unlock the card, Select the card -> Go to Advanced section -> click on the Unlock to change properties. After unlocking the data card, you can design the form by using the form properties like Layout, Color, Border, Font Size, Font Text etc.
- As I want to view the SharePoint list item based upon their ID, So I need to apply this below formula on Display form’s Items property as:
Items = First( Filter( 'Event Itinerary', ID = 2 ) )
Refer to the below screenshot.
So this is one of the ways that we can use to display the item (single item) in the PowerApps Display form.
Next comes the PowerApps Gallery control where the user can display all the SharePoint List items at a time.
- There is a total of six types of Gallery control are present in the PowerApps. Based on your requirement, you can choose any type of gallery in PowerApps.
- In this scenario, I have taken a Vertical Gallery control. To add it, go to Insert tab -> Click on Gallery -> Select Vertical as shown below.
- When you will add a vertical gallery control, by default it will appear with the Image, title and subtitle layout and the Items should be CustomGallerySample.
- To display the SharePoint List items, We need to set the Gallery’s Items property to the SharePoint List name i.e. Event Itinerary.
- Once you have added the list, then the items will display as like the above screenshot. As there is no image field in the list, that’s why the image fields are showing us empty or blank.
- Also, if you want to display more extra SharePoint fields or items in the gallery control, then select the first section of the gallery and add a Label control on that.
- Select the Label control and apply this below formula on its Text property as:
Text = ThisItem.'Session Type'.Value
‘Session Type’ = SharePoint Choice Column. As this is a choice field, that’s why we need to put a ‘.Value’.
- If the SharePoint column is a Single line of text, then you need to apply this below formula as:
Text = ThisItem.'Column Name'
- Suppose, you want to display the gallery item with different layout, then you can change the gallery layout. There are many different types of gallery layouts that you can use for different purposes.
- Select the gallery control -> go to Properties section -> click on the Layout dropdown and select any layout for the gallery control as shown below.
So this is another way where we can use a gallery control to display the SharePoint List items in PowerApps.
PowerApps Data Table is a type of table that displays a set of data in a tabular format. Similarly, if you want to display all the SharePoint records in PowerApps, then you can use the Data table in PowerApps. Let’s take a simple scenario.
- To add a PowerApps Data table, Go to the Insert tab -> click on the Data table. Once you will click on it, then a blank table will appear on the screen as like below.
- To display all the SharePoint list items, you need to provide the list name on its Items property as:
Items = 'Event Itinerary'
- When you will provide the list name to the PowerApps data table, then all the SharePoint columns and records will appear in the table. Once you will unlock all the columns, then only you can design the table by using its various properties.
- If you are unaware how to update the data table columns in PowerApps, then checkout the below tutorial:
Similarly, to display all the SharePoint List Items in PowerApps, you can use the PowerApps List screen.
Please check out the below-detailed guide that how you can add a List screen and how to use it in PowerApps by taking some simple scenarios.
At last, there is another way where you can use some PowerApps Charts (like Column Chart, Line Chart, or Pie Chart) to show all the SharePoint List records or values.
To work with the various Power Apps Charts, you can refer to the below PowerApps tutorial:
In this scenario, We will discuss how to get SharePoint List items based upon the item ID in PowerApps.
- 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 will enter the SharePoint list ID is 3, then I would like to filter and display the item details (of ID 3 only) in the data table.
- To achieve this, Insert this below code on the Data table’s Items property as:
Items = Filter( 'Event Itinerary', ID = TextInput1.Text )
TextInput1 = Text input control name
- Now save and preview the app. Enter the item ID (the details that you want to display in the data table) in the text input control. Then you can see the filtered result in the data table as shown above.
To follow more examples, you can follow the below tutorial that how you can filter the SharePoint list in PowerApps:
In this Power Apps tutorial, we learned, how to display SharePoint list items in Power Apps and also, how to get SharePoint list items by ID in Power Apps.
Also, you may like these below PowerApps Tutorials:
- PowerApps repeating table
- PowerApps Dropdown Gallery + Examples
- Power Apps Dropdown Control – How to use
- Power Apps List Box Control – Complete tutorial
- PowerApps Container Control – Complete tutorial
- Power Apps Image Control – How to use
- Power Apps Audio and Video Control [Detailed tutorial]
- Power Apps GroupBy Function example
- Power Apps Choices Function with Examples
- Power Apps Button OnSelect [Complete Tutorial]
- Show hide fields based on dropdown selection PowerApps (2 Examples)
- PowerApps CountIf Function with Examples
- PowerApps CountRows function with Examples
- PowerApps Count Function with Examples
- PowerApps CheckBox – How to use
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com