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 / Patch nested gallery
Power Apps
Unanswered

Patch nested gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

HI all,

 

Hope you are doing well.

 

I-m trying to patch a nested gallery in SharePoint list but i'm not able to achieve it. I have a Parent Gallery where my Child Gallery is present.

 

Here the Items properties on the Parent Gallery :

 

Distinct(Filter(PAT_Tracker_AppSettings, Country = Prod_DropDown_Country.Selected.Result),Exception)

 

 

Here the Items properties on the Child Gallery : 

 

Filter(PAT_Tracker_AppSettings,ThisItem.Result = Title && Country = Prod_DropDown_Country.Selected.Result)

 

 

I'm using the below code on a button to patch items, but this corde works only for selected item. I want to patch all nested items.

 

//===Filter and Patch Child Gallery items.
ForAll(
 Filter(
 AddColumns(
 ChildGallery.AllItems,
 //===Add a column for sum of Calls and Emails
 "CallsAndEmailsSum", Sum(Value(Prod_inptCallsHandled.Text), Value(Prod_inptEmailsHandled.Text)),
 //===Add a column for sum of all SL inputs
 "SLsSum", Sum(Value(Prod_inptSL1.Text), Value(Prod_inptSL2.Text), Value(Prod_inptSL3.Text), Value(Prod_inptSL4.Text))
 ),
 //===Perform check: Calls + Emails is greater than zero
 //===Perform check: Calls + Emails = Sum of SL inputs
 CallsAndEmailsSum > 0 && CallsAndEmailsSum = SLsSum
 ) As ChildGalleryRecord,
		Patch(PAT_Tracker_AppResults, Defaults(PAT_Tracker_AppResults), 
			{'Task Date': Text(Prod_DatePicker.SelectedDate, "dd/mm/yyyy")},
			{'Agent Name': ChildGalleryRecord.lblAgentName.Text},
			{'Agent EmailAddress': Text(PeoplePicker.Selected.Mail)},
			{'Task Type': Text("Handled")},
			{Country: ChildGalleryRecord.Prod_lblCountry.Text},
			{Exception: ChildGalleryRecord.Prod_lblException.Text},
			{Carrier: ChildGalleryRecord.Prod_lblCarrier.Text},
			{Offered: 0},
			{'Calls Handled': If(IsBlank(ChildGalleryRecord.Prod_inptCallsHandled.Text),0,(ChildGalleryRecord.Prod_inptCallsHandled.Text))},
			{'Emails Handled': If(IsBlank(ChildGalleryRecord.Prod_inptEmailsHandled.Text),0,(ChildGalleryRecord.Prod_inptEmailsHandled.Text))},
			{'Handled SL1': If(IsBlank(ChildGalleryRecord.Prod_inptSL1.Text),0,(ChildGalleryRecord.Prod_inptSL1.Text))},
			{'Handled SL2': If(IsBlank(ChildGalleryRecord.Prod_inptSL2.Text),0,(ChildGalleryRecord.Prod_inptSL2.Text))},
			{'Handled SL3': If(IsBlank(ChildGalleryRecord.Prod_inptSL3.Text),0,(ChildGalleryRecord.Prod_inptSL3.Text))},
			{'Handled SL4': If(IsBlank(ChildGalleryRecord.Prod_inptSL4.Text),0,(ChildGalleryRecord.Prod_inptSL4.Text))}
 )
 )

 

 

If i'm taking the below photo as example, the code need to patch 3 items. 1 for Warehouse Delay & 2 for Rescheduled by Courrier but actually it's only patching 2 items and both are Rescheduled by courrier (because i think it's the selected one)

Mts1_0-1659898563484.png

 

I don't know if my explanations are really clear, but i'm blocked since days now.

 

Hope someone will be able to help me here !

 

Regards

Categories:
I have the same question (0)
  • Akash17 Profile Picture
    Super User 2024 Season 1 on at
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    Thanks for your reply.

     

    His solution is not working for me.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard