As far as we know, Power Apps have a variety of input controls with distinctive properties. One of the most useful controls among them is the Power Apps Data table.
This Power Apps tutorial will assist you in knowing what is a data table in Power Apps and how to use it with various examples.
We will also talk about some additional Power Apps Data table-related topics, such as:
- Add items manually in a Power Apps Data table
- Bind SharePoint list items in a Power Apps Data table
- How to add a custom column in the Power Apps data table
- Connect Power Apps Data table control to another control
- Availability and Nonavailabilty in Power Apps Data table
- Power Apps data table limit
Power Apps Data Table
One control that can be used to show a lot of data in a tabular form is the Power Apps Data Table. The data table contains a header for each field that the control displays.
Similarly to the Power Apps Gallery Control, the Data table control contains the selected property that directs to the selected row. The data table control can be linked to other controls as well.
Below are some of the important properties of the Power Apps Data table control:
Property | Description |
---|---|
Items | Defines the source of data that appears in the Data table control. |
Selected | Specifies the selected row in the Data table control. |
FieldDisplayName | Defines the property of a column inside a data table that defines the display name for the selected column. |
IsHyperlink | Specifies the property of a column inside a data table that defines whether the selected column should be in hyperlink format or not. |
Text | Specifies the property of a column inside a data table that defines whether the selected column should be in hyperlink format. |
NOTE:
The most significant and well-known problem with Power Apps Data control is that no data shows up if you use the FirstN function in the Items property.
Add Items Manually in Power Apps Data Table
- To add items manually in a Power Apps Data table control, insert a Data table [+ Insert -> Search Data table -> Select Data table (preview) under the Layout section] to the screen.
- Select the data table and set its Items property as:
Items = ["Anna Karenina", "Beloved", "The Color Purple", "Things Fall Apart"]
You must ensure your items should be enclosed with a bracket ([]) and an inverted comma (“”).
- To add the value to the data table, go to the Properties pane -> 0 selected from the Fields section -> + Add field -> Select Value -> Click Add, as shown below.
- Now, the Power Apps data table will appear with the items below.
- If you want to rename the table header text, then select the data table -> go to the Properties pane -> Header Text -> Rename the header [Best Top Novels].
This way, we can insert items manually in the Power Apps Data table control.
Add SharePoint List Items in Power Apps Data Table
Next, we will see how to insert items from the SharePoint list into a Power Apps Data table control.
- I have a SharePoint list named TSInfo Attachments. These are the columns below:
Column | Data type |
---|---|
ID | Number |
Title | Single line of text |
Is Received | Yes/no |
Attachment Types | Choice [Microsoft Document, PPT, PDF, Excel] |
Attachment Costs | Currency |
Attachment Created Date | Date and time |
I want to display all the list items in a Power Apps Data table control.
- Insert a Data table control and set its Items and Data source property to list name as:
Items = 'TSInfo Attachments'
Data source = TSInfo Attachments
NOTE:
Before adding the code, you must ensure to connect the SharePoint list connector to the Power Apps Canvas application.
- Then, you will see all the list items (including columns) in the Power Apps Data table, as shown below. Once you select any particular field, you can see its Text property will be:
Text = ThisItem.Title
- Similarly, you can use its Header Text property under the Properties pane to rename any specific header from the table.
This way, we can add SharePoint list items to the Power Apps Data table control.
Power Apps Data Table Add Custom Column
So, how can we expand the Power Apps Data table control by adding a custom column?
- Certain fields show up in the data table, and some are hidden when we connect the Sharepoint list data source to the table.
- To connect more SharePoint custom columns to the data table, Select the Data table -> go to Properties -> Edit Fields from Fields -> + Add Field -> select the fields you want to display in the data table (as like Created, Created By, ID, etc.) -> Add.
- As you can see, the data table will soon get the new custom columns. Take a look at the screenshot that follows.
This is how to add a custom column in the Power Apps Data table control.
Connect Power Apps Data Table Control to Another Control
Let’s connect the Power Apps Data table to other controls.
- There is a Data table control and a Display form in the app. The right-side display form will display all record details if a user selects a particular record from the table.
- To work around this, insert a Power Apps Display form and set its DataSource property as:
DataSource = 'TSInfo Attachments'
- Select the Display form and apply the code below on its Item property as:
Item = AttachmentsTable.Selected
Where,
AttachmentsTable = Data table control name
- Save, publish, and preview the app. Select a specific item from the data table and you can see the item information will appear in the display form.
Availability in Power Apps Data table
The below points represent all the availabilities in Power Apps Data table control:
- Data in a Data table control is read-only.
- A single row is always selected in a Data table control.
- Link a Data table control to a connected or local data source.
- Adjust column widths in a Data table control while you run the app, though your changes aren’t saved.
- A set of default fields appears in a Data table control when you link it to a connector that has implemented this capability, such as the Microsoft Dataverse. You can then show or hide these fields and others as necessary.
- Customize column width and heading text.
- Show hyperlinks in a Data table control.
- Copy and paste a Data table control.
Nonavailability in Power Apps Data table
The below points represent all the non-availabilities in Power Apps Data table control:
- Customize the styling of individual columns.
- Add a Data table control in a form control.
- Change the height of all rows.
- Show images in a Data table control.
- Show fields from related tables.
- Use built-in functionality to filter and sort data by column heading.
- Add a Data table control in a Gallery control.
- Edit data in the Data table control.
- Select multiple rows.
Power Apps Data Table Limit
There should be a restriction on the amount of data that every Power Apps control can hold when in use. Similarly, there are certain item restrictions with the Power Apps Data table control. A user may add 500 records at a time to the data table.
Your data source may show up with delegation warning problems in Power Apps if it has more than 500 items. In this case, you can modify the Power Apps limit on the number of nondelegatable functions that can be applied to data sources from 500 to a maximum of 2000.
Conclusion
Power Apps Data Table control is an essential and functional component for displaying structured data within canvas apps.
From this Power Apps tutorial, I hope you understand what a Data table in Power Apps is and how to manually add items in a data table and from the SharePoint list.
Also, we saw how to add custom columns to the Power Apps data table, connect the data table to other controls, and many more like:
- Availabilities and non-availabilities in Power Apps Data table
- Power Apps Data table limitations
Additionally, you may like some more Power Apps tutorials:
- Power Apps Data Table URL
- How to Filter Data table in Power Apps?
- Power Apps Data Table Conditional Formatting
- Export Data from Data Table to Excel in Power Apps
- How to Delete Rows in Power Apps Data Table?
- How to Make Power Apps Data Table Empty?
- How to Hide a Column in Power Apps Data Table?
- Power Apps Data Table Default Select Row
- How to Sum Column in Power Apps Data Table?
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