How to Show Repeating Table Data From SharePoint List in Power Apps? [With Bulk Update]

I developed a Power Apps application for Employee Travel Request Management a few days back. As a part of this, I needed to create repeating tables in Power Apps to submit flight and family details information during the request submission process.

After submitting the data, I had to fetch and display these flight and family details in a repeating table format, making it easier for employees to view and understand their entries.

In this article, I will explain how to show repeating table data from SharePoint list in Power Apps with a simple example.

Additionally, I will show you how to update the Items in PowerApps Repeating Table [Individual Items] to the SharePoint list.

Show Repeating Table Data From SharePoint List in Power Apps

Look at the example below. I have a gallery in Power Apps that contains employee travel requests. When I click on any item, it navigates to another screen, and the selected items’ full details are displayed in a Power Apps form control and repeating tables.

How to fetch data from sharepoint list in powerapps repeating table

I have three SharePoint lists that store employee travel requests separately. The main SharePoint list, Employee Travel Request Details, is below.

Note: Travel ID and Employee Name are the common fields in all three lists.
power apps sharepoint list repeating table

Here is the SharePoint list that stores flight details for employee travel requests.

repeating tables in power apps

This is the SharePoint list that stores family details of employee travel requests.

repeating table in sharepoint list

Follow the steps below to achieve this!

1. Connect the Power Apps application with the above three SharePoint lists. Then, add a Power Apps gallery control on a new screen and provide the list name below in its Items property.

'Employee Travel Request Details'
powerapps repeating table edit screen

2. Provide the formula below for the gallery control‘s OnSelect property. Before that, add a new scrollable screen and name it like in the first parameter of the navigate function.

Navigate(TravelRequest_Screen_View,ScreenTransition.CoverRight)

When we click on any item in gallery control, it will navigate to another screen with the help of the above formula.

  • TravelRequest_Screen_View = Screen name.
  • ScreenTransition.CoverRight = Screen transition property.
Note: On the scrollable screen, you'll see a Canvas object, and DataCard will be present, so we need to add the form and gallery controls to the data card. Unfortunately, we can't add a form control directly, so first add a Power Apps Container, and within that, we can add the remaining controls. 

3. Add a Power Apps form control to the “TravelRequest_Screen_View” screen. Then, add the below formulas to the provided properties.

DataSource = 'Employee Travel Request Details'
Item  = Gal_TravelRequests.Selected
DefaultMode = FormMode.View
Layout = Vertical
Columns =4

After providing all the above formulas to the respective properties, you can preview it once; whatever we select in the gallery will display the details in the form.

display sharepoint list data in power apps repeating table

4. To display the gallery-selected flight details on the Power Apps repeating table, add a gallery control and the formula below to its Items property.

Items = Filter('Flight Details',TravelID=Gal_TravelRequests.Selected.TravelID)

This formula filters the flight details of the selected item in the gallery.

Also, add the controls below within the Power Apps gallery. [You can also use Text labels instead of these controls].

  • Three Text input controls = For S.No, Flight From, Flight To.
  • DatePicker = For Flight Date.
  • Dropdown = For Flight Ticket Type.

Provide the formulas below in the Default property of each control within the gallery to display data.

S.No = ThisItem.'S.NO'
Flight From =ThisItem.'Flight From'
Flight To = ThisItem.'Flight To'
Flight Date = ThisItem.'Flight Date' [Provide formula to DefaultDate property of date picker]
Flight Ticket Type = ThisItem.'Flight Ticket Type'.Value 
[Provide the Choices([@'Flight Details'].'Flight Ticket Type') to the dropdown Items property]
retrieve sharepoint list data in power apps repeating table

5. To fetch family details of the gallery-selected item, add another gallery control and provide the below formula in its Items property.

Filter('Family Details',TravelID=Gal_TravelRequests.Selected.TravelID)

The above formula filters the family details of the gallery-selected item.

Also, add four text input controls within the gallery control and provide the formulas below for its Default property.

S.NO  = ThisItem.'S.NO'
Full Name = ThisItem.'Full Name'
Family Relation = ThisItem.FamilyRelation
Age = ThisItem.Age
powerapps repeating table with drop down

Now, save the changes and preview the app once. The details of the gallery-selected item will appear in the Power Apps form and repeating table controls.

Update PowerApps Repeating Table Data [Individual Items] to SharePoint List

Let’s see how to update the Power Apps repeating table items into a SharePoint list. In the example below, you can see that I can update the items in the repeating table.

how to update the value in power apps repeating table

Follow the steps below to achieve this!

1. In the “TravelRequest_Screen_View” screen on the flight details repeating table [ gallery], add an Edit icon and provide the formula below in its OnSelect property.

UpdateContext({varEditMode: !varEditMode});
Set(selectedItemID, ThisItem.ID)

The UpdateContext and Set functions are used to create variables.

  • varEditMode = toggled variable.
  • selectedItemID = Contains current item id.
update the items in powerapps repeating table

2. Provide the formulas below for each control DisplayMode property in the gallery control.

If(selectedItemID = ThisItem.ID && varEditMode, DisplayMode.Edit, DisplayMode.View)
edit power apps repeating table items

4. Now, add a button control, name it “Update,” and provide the formula below in its OnSelect property.

Patch(
    'Flight Details',
    LookUp(
        'Flight Details',ID= selectedItemID
    ),
    {
        'Flight From': txt_Flight_From.Text,
        'Flight To': txt_Flight_To.Text,
        'Flight Date': dtp_Flight_Date.SelectedDate,
        'Flight Ticket Type': {Value: drp_TicketType.Selected.Value}
    }
)
power apps repeating table update items

5. Save the changes and preview the app once. Then, try to edit an item and update it once. Then, in the SharePoint list, check it once, and it will update.

how to edit data of repeating table in power apps

Update PowerApps Repeating Table Data [Bulk Items] to SharePoint List

Here, I will explain how to edit and update the bulk items from Power Apps, repeating the table to the SharePoint list.

In the example below, you can see that I can edit all the records in the repeating table; once I click the update button, the details are successfully updated to the SharePoint list.

powerapps patch update multiple records from repeating table

Follow the steps below to achieve this!

1. Add a toggle control within the Power Apps repeating table and provide the below formula in its Default property.

ThisItem.'Flight Date' <> dtp_Flight_Date.SelectedDate || ThisItem.'Flight From' <> txt_Flight_From.Text || ThisItem.'Flight Ticket Type'.Value <> drp_TicketType.Selected.Value || ThisItem.'Flight To' <> txt_Flight_To.Text 

The above code returns the boolean value if any fields are changed in the repeating table.

  • ThisItem.’Flight Date’, ThisItem.’Flight From’, ThisItem.’Flight Ticket Type’, etc., represents the SharePoint list field names.
  • Below are the names of the controls present in the gallery control.
    • dtp_Flight_Date
    • txt_Flight_From
    • drp_TicketType
    • txt_Flight_To
how to edit power apps repeating table data

The example below shows that the toggle control was turned on when I changed the actual value of any field in a record.

update bulk items from powerapps repeating table data

Now, make the Visible property of the toggle control false.

2. Add the code below to the update button on the OnSelect property.

ForAll(
    Filter(
        Gal_Flight_Details.AllItems,
        Toggle.Value = true
    ),
    Patch(
        'Flight Details',
        ThisRecord,
        {
            'Flight Date': dtp_Flight_Date.SelectedDate,
            'Flight From': txt_Flight_From.Text,
            'Flight Ticket Type': {Value: drp_TicketType.Selected.Value},
            'Flight To': txt_Flight_To.Text
        }
    )
);
Notify(
    "Details Updated Successfully",
    NotificationType.Success
)

This code filters the updated records present in the repeating table. Then, the patch function will update those updated values to the SharePoint list.

power apps patch update bulk records from repeating table

3. Now save the changes and preview the app once. While clicking the item in a gallery, it displays the related details of that item in the Power Apps repeating table; once I click on the update button after editing the repeating tables data, that is stored in the SharePoint list like in the image below.

power apps patch multiple records in sharepoint list

This way, we can edit and update the multiple records in the Power Apps repeating table.

Update PowerApps Repeating Table Data [Bulk Items Sum] to SharePoint List

I recently implemented the Power Apps repeating table for employee expense reports. There, I was required to store the updated grand total value for each record in the SharePoint list.

The employee expense report list contains the Total and Grand Total fields. The Total field stores the sum of the Furniture, Office Appliances, and Snacks field values. The Grand Total stores the sum of each record’s Total field value.

powerapps data table add edit button

Look at the example below. After updating the values for furniture, office appliances, and snacks, the total and grand total values also changed automatically. Then, those values are successfully updated to the SharePoint list.

power apps patch sum of multiple records to sharepoint list

Follow the steps below to achieve this!

1. Add a Power Apps gallery control to display the SharePoint list values. In its Items property, provide the SharePoint list name below.

'Employee Expense Report'
edit power apps repeating table data

Also, add the text input and combo box control and provide the below formulas on its Default property:

Column NameInput controlsFormulas on Default property
Expense TitleText Input controlThisItem.Title
CurrencyCombo boxThisItem.Currency

Items: Choices([@’Employee Expense Report’].Currency)
FurnitureText Input controlThisItem.Furniture
Office AppliancesText Input controlThisItem.’Office Appliances’
SnacksText Input controlThisItem.Snacks
2. For the Total field, add a text input control and provide the code below in its Default property.
Sum(Value(txt_Office.Text),Value(txt_snacks.Text),Value(txt_furniture.Text))

The Sum() function will sum the provided values.

powerapps repeating table edit screen

3. Add a Text label and provide the formula below in its Text property to get the grand total value.

Sum(Gal_EMPExpenses.AllItems,Value(txt_total.Text))

The above sum function will add each record’s total value.

repeating table in powerapps using sharepoint list

4. Add a button control to save the updated repeating tables data to the SharePoint list. Then, add the code below to its OnSelect property.

//Collection to store SharePoint list data
ClearCollect(colGrandtotal,'Employee Expense Report');

//Collection that stores only the Total field values.
ClearCollect(
    colTotalsOnly,
    ForAll(
        Gal_EMPExpenses.AllItems,
        {Total: Value(txt_total.Text)}
    )
);

//Save Updated data to SharePoint list
ForAll(
    Filter(
        Gal_EMPExpenses.AllItems,
        Toggle1.Value = true
    ),
    Patch(
        'Employee Expense Report',
        ThisRecord,
        {
            Title: txt_ExpenseTitle.Text,
            Furniture: Value(txt_furniture.Text),
            'Office Appliances': Value(txt_Office.Text),
            Snacks: Value(txt_snacks.Text),
            Total: Value(txt_total.Text),
            Currency: {Value: cmb_Currency.Selected.Value}
        }
    )
);
Notify(
    "Details Updated Successfully",
    NotificationType.Success
);

//Save Grand Total data to SharePoint list.
ForAll(
    colGrandtotal,
    Patch(
        'Employee Expense Report',
        ThisRecord,
        {
            'Grand Total': Sum(
                colTotalsOnly,
                Total
            )
        }
    )
);
Clear(colGrandtotal);
Clear(colTotalsOnly);
  • colGrandtotal = Collection that stores SharePoint list details.
  • colTotalsOnly = Collection that stores only Total field values from the Power Apps gallery.
  • The first ForAll() function stores the updated data in the SharePoint list.
  • Sum(colTotalsOnly, Total) = Get the sum of each record’s total values.
  • In the second For All()function, we save the grand total value to the SharePoint list using the patch function.
  • The clear () function clears the collection data.
update power apps repeating table data to sharepoint list

5. Save the changes and preview the app once. Then, change the values for furniture, office appliances, and snacks. The total and grand total will be changed automatically; click the update button to save those details to the SharePoint list.

editing a power apps repeating table after submitting

This way, we save the Power Apps repeating tables and updated calculations to the SharePoint list.

I hope you understand retrieving & updating SharePoint list details on the Power Apps repeating tables. This approach can be used when you have multiple SharePoint lists connected with a common field and want to display those fields’ data in Power Apps.

Also, you may like:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App