web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps Repeating t...
Power Apps
Unanswered

Power Apps Repeating table or section

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to create a repeating table for office 365 Powerapps from a SharePoint list . The attached is code for a button to the  Gallery for the repeating table.

 

Does anyone have any clue what I need to do? 

Thanks

Tom Weber

 

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

    @Shanescows  (Shane Young) has a series on repeating tables.  There are actually 3 videos starting with this one. https://www.youtube.com/watch?v=xgznk4XlPCo 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I can not get his code to work... Any other step by step guide?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    You could try this one https://www.c-sharpcorner.com/article/repeating-table-in-powerapps-same-as-in-infopath-form/ .  What you are requesting has been approached by many folks trying to migrate from Infopath to PowerApps due to MicroSoft deprecating Infopath. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This is what I am trying to do see attached. 

     

    I have created a new app in Powerapps. Made a connection to my SharePoint list. I just need the steps to turn the gallery(Shown in PIc) into a repeating table. 

     

    If you have any ideas.

     

    Thanks

    Tom Weber

     

     

    repeating table.png
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about the formula you used for creating repeating Gallery?

    Which data source does the Repeating Table (Gallery) would save data to?

     

    Based on the needs that you mentioned, I think the collection could achieve your needs. Please consider take a try with the following workaround:

    Set the OnStart property of App or the OnVisible property of current Edit screen to following:

    Clear(RepeatingTable);
    Collect(
     RepeatingTable, 
     {
     Id: CountRows(RepeatingTable) + 1,
     PartNo: "",
     PartDescription: "",
     QTY: "",
     'Unit Price': "",
     'Net Weight(KG)': "",
     'Total Weight(KG)': "",
     'MFG Name': "",
     'MFG Address': ""
     }
    )

     

    Within your Edit form screen, set the Items property of the Gallery to following:

    RepeatingTable

    set the OnSelect property of the "+" icon inside the Gallery to following:

    Collect(
     RepeatingTable, 
     {
     Id: CountRows(RepeatingTable) + 1,
     PartNo: "",
     PartDescription: "",
     QTY: "",
     'Unit Price': "",
     'Net Weight(KG)': "",
     'Total Weight(KG)': "",
     'MFG Name': "",
     'MFG Address': ""
     }
    )
    

    set the OnSelect property of the "Save" icon to following:

    Patch(
     RepeatingTable,
     LookUp(RepeatingTable, Id = ThisItem.Id),
     {
     PartNo: PartNoTextBox.Text,
     PartDescription: PartDescriptionTextBox.Text,
     QTY: QTYTextBox.Value,
     'Unit Price': UnitPriceTextBox.Text,
     'Net Weight(KG)': NetWeightTextBox.Text,
     'Total Weight(KG)': TotalWeightTextBox.Text,
     'MFG Name': MFGNameTextBox.Text,
     'MFG Address': MFGAddressTextBox.Text
     }
    )

     

    If you want to submit the RepeatingTable collection back to your SP List when you submit your form data successfully, please consider set the OnSuccess property of the Edit form to following:

    ForAll(
     RepeatingTable,
     Patch(
     'Target SP List', // represens the SP List you want to save your repeating table collection data back to
     Defaults('Target SP List'),
     {
     PartNo: Value(RepeatingTable[@PartNo]),
     PartDescription: RepeatingTable[@PartDescription],
     QTY: Value(RepeatingTable[@QTY]),
     'Unit Price': Value(RepeatingTable[@'Unit Price']),
     'Net Weight(KG)': Value(RepeatingTable[@'Net Weight(KG)']),
     'Total Weight(KG)': Value(RepeatingTable[@'Total Weight(KG)']),
     'MFG Name': RepeatingTable[@'MFG Name'],
     'MFG Address': RepeatingTable[@'MFG Address']
     }
     )
    )

     

    Please consider take a try with above solution, re-load your app, then check if the issue is solved.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I am sending to the following datasource which is a SharePoint list:
    The Form:
    DataSource = MaterialInformation_9 

     

    The Gallery:
    DataSource = MaterialInformation_9 

     

    Both the form and the gallery are the same table in SharePoint. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Kris Dai, 

     

    Thanks for your response, I think we are almost there. 

    This is what I have so far. I had to make a few mods for column data. I have attached a powerpoint  to show more info. 

    Not sure how to insert a new record though, should the Save button when clicked advance you to the next record?

     

    Thanks

    Tom Weber

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    HI @Anonymous ,

    Firstly, I found that there is something wrong with the formula you typed within the OnSelect property of the "+" icon in your Gallery. The Clear function is used to clear all records in a collection. If you want to add a new entry in your Repeating Gallery via clicking the "+" icon, please do not type the Clear function within the OnSelect property of the "+" icon.

    Make sure the OnSelect property of the "+" icon in your Gallery to following (do not type Clear function in following formula😞

    Collect(
     RepeatingTable, 
     {
     Id: CountRows(RepeatingTable) + 1,
     PartNo: "",
     PartDescription: "",
     Quantity: "",
     UnitPrice: "",
     TotalPrice: "",
     UnitNetWeight: "",
     TotalNetWeight: "",
     ManufacturerName: "",
     ManufacturerAddress: ""
     }
    )

     

    For the OnSelect property of your "Save" icon in your Gallery, I think you have some misunderstanding with the PartNumberTextBox, PartDescriptionTextBox, QuantityTextBox, ....  all of these are sample control name within the Repeating Gallery, which are used to collect user entry. On your side, you should replace them with actual control name of Text Input Box within your own repeating Table Gallery.

    e.g. If you should modify your formula as below:

    Patch(
     RepeatingTable,
     LookUp(RepeatingTable, Id = ThisItem.Id),
     {
     PartNo: TextInput1.Text,
     PartDescription: TextInput2.Text,
     Quantity: TextInput3.Value,
     UnitPrice: ...,
     TotalPrice: ...,
     UitNetWeight: ...,
     TotalNetWeight: ...,
     ManufacturerName: ...,
     ManufacturerAddress: ...
     }
    )

     

    Best regards, 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Almost there.  I attached a powerpoint, I am getting an error on the Save button. Wondering if you see anything I did wrong

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Based on the screenshot that you mentioned, I found that there is an issue with it. You have typed some additional text within your formula -- AsType(. Please remove the "AsType(" text from your formula:

    6.JPG

     

    In addition, you must replace the PartNoTextBox, PartDescriptionTextBox, QuantityTextBox, .... with actual Text Input box control name within your Gallery.

     

    Note: Above Patch function is used to update an record in Repeating Table collection rather than create a new record. Within your app, you use the Collect function to create new record in Repeating Table collection.

     

    More details about Patch function, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 577

#2
WarrenBelz Profile Picture

WarrenBelz 440 Most Valuable Professional

#3
Haque Profile Picture

Haque 308

Last 30 days Overall leaderboard