Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Unable to patch multiple records in sharepoint through gallery

(1) ShareShare
ReportReport
Posted on by 242
Hi Everyone,
 
Can someone plsssss help me on this? i have sepnt hrs but unable to solve. i have tried all the way but nothing worked. I want to update records in sharepoint list through gallery, as i have repeated column projectIDs and IDs are repeated, then against each Project there are more then 4 milestones and each milestone has start and end date. i want to update multiple dates at once but only able to update one row item at once. 
 this is the formula i am using to save the records.
If(IsBlank(Patch(TS_Project_Milestones,
LookUp(TS_Project_Milestones, Project_ID = Gallery4.Selected.Project_ID && Milestone = Gallery4.Selected.Milestone),
{
Start_Date: DatePicker1.SelectedDate,
End_Date: DatePicker1_1.SelectedDate
}
))
  • ANB Profile Picture
    ANB 7,060 on at
    Unable to patch multiple records in sharepoint through gallery
    Hi @aayaanmayank, The code should work if Milestone is added in AND condition with Project ID. 
     
    Try this:
     
    Patch(TS_Project_Milestones,
          ForAll(Gallery4.AllItems, 
                 {
                         Start_Date: DatePicker1.SelectedDate,
                         End_Date: DatePicker1_1.SelectedDate
                  }
                 )
    )

    Please click Does this answer your question 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 a Like.


    Thanks,
    ANB
     
  • aayaanmayank Profile Picture
    aayaanmayank 242 on at
    Unable to patch multiple records in sharepoint through gallery
    hi thanks for trying but this is updating one date across all the date picker for that projectID. 
  • ANB Profile Picture
    ANB 7,060 on at
    Unable to patch multiple records in sharepoint through gallery
    Hi @aayaanmayank, Try this:
     
    ForAll(Gallery4.AllItems As Var,
           Patch(TS_Project_Milestones,
                 LookUp(TS_Project_Milestones, 
      Project_ID = Var.Project_ID && Milestone = Var.Milestone
      ), { Start_Date: DatePicker1.SelectedDate, End_Date: DatePicker1_1.SelectedDate } )
    ​​​​​​​)

    Please click Does this answer your question 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 a Like.


    Thanks,
    ANB

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard