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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / patch multiple gallery...
Power Apps
Answered

patch multiple gallery repeating table together with form

(0) ShareShare
ReportReport
Posted on by 418

Hi, on my screen page i have create a form with 2 gallery for repeating table and store it to collection before final submit.. it is possible to patch this OnScreen (Form) using this formula? or any other way to combine together?

 

Because not error occur but this patch not save data to sharepoint list..only save the Form data

 

ForAll(
 colApp,
 If(
 !IsBlank(invoiceno),
 If(
 CountRows(colApp) > 0,
 Patch(
 sinc_main_payment,
 Defaults(sinc_main_payment),
 {
 Title: Form1.LastSubmit.ID,
 app_no: Form1.LastSubmit.Title,
 invoice_no: invoiceno,
 invoice_date: DateValue(invoicedate),
 invoice_amount: invoiceamount
 }
 )
 )
 )
);
ForAll(
 colTeam,
 If(
 !IsBlank(staffname),
 If(
 CountRows(colTeam) > 0,
 Patch(
 sinc_main_team,
 Defaults(sinc_main_team),
 {
 Title: Form1.LastSubmit.ID,
 app_no: Form1.LastSubmit.Title,
 name: staffname,
 department: departmentname,
 percentage: percent
 }
 )
 )
 )
);
Clear(colApp);
Clear(colTeam);

 

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @twister ,

    Two things possibly - firstly, put the CountRows() test at the start. Also is your invoicedate already a date field in the collection?

    If(
     CountRows(colApp) > 0,
     ForAll(
     colApp,
     If(
     !IsBlank(invoiceno),
     Patch(
     sinc_main_payment,
     Defaults(sinc_main_payment),
     {
     Title: Form1.LastSubmit.ID,
     app_no: Form1.LastSubmit.Title,
     invoice_no: invoiceno,
     invoice_date: invoicedate,
     invoice_amount: invoiceamount
     }
     )
     )
     )
    );
    If(
     CountRows(colTeam) > 0,
     ForAll(
     colTeam,
     If(
     !IsBlank(staffname),
     Patch(
     sinc_main_team,
     Defaults(sinc_main_team),
     {
     Title: Form1.LastSubmit.ID,
     app_no: Form1.LastSubmit.Title,
     name: staffname,
     department: departmentname,
     percentage: percent
     }
     )
     )
     )
    );
    Clear(colApp);
    Clear(colTeam);

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • twister Profile Picture
    418 on at

    yes, invoicedate already in collection because if im using 1 gallery(1 repeating table = colApp) only the patch function working well.  The issue happen after i tried to combine 2 gallery (add colTeam).. I can't see any error but the patch data not save in sharepoint..

     

    i also try to used your formula but the result are same.. still looking where is my mistake..

    twister_1-1613442199995.png

     

     

    twister_0-1613442174826.png

     

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    @twister ,

    You are trying to write a numeric field (ID) into a Text Field (Title) try

    Title: Text(Form1.LastSubmit.ID)

    I can only guess here as I cannot see your data structure.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @twister ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • twister Profile Picture
    418 on at

    yes.. consider success after i recheck & redo the formula, also due to I have missed up my formula.. thanks @WarrenBelz 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard