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)

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