Hi guys,
I'm trying to find a way to update a collection of items that have matching ID's to items I'm managing in a gallery.
The issue is the gallery rows have inputs with information I'm wanting to capture and I can't seem to reference those specifically.
I'd ideally like to do this in one function like seen below but I hit a brick wall with referencing the inputs.
ForAll(
Filter(
Gal.AllItems,
ThisRecord.Checkbox.Value = true
),
UpdateIf(
Collection,
ID = ThisRecord.ID,
{
Value1: ThisRecord.Dropdown1.SelectedText.Value,
Value2: ThisRecord.Dropdown2.SelectedText.Value
}
)
)
Below is my current solution working, I'd rather not create a temp collection to make it work though if possible.
ForAll(
Filter(
Gal.AllItems,
ThisRecord.Checkbox.Value = true
),
Collect(
TempCollection,
{
TempID: ThisRecord.ID,
TempValue1: ThisRecord.Dropdown1.SelectedText.Value,
TempValue2: ThisRecord.Dropdown2.SelectedText.Value
}
)
);
ForAll(
TempCollection,
UpdateIf(
Collection,
ID= TempID,
{
Value1: TempValue1,
Value2: TempValue2
}
)
);
Clear(TempCollection)
Any ideas?
I've done some tested, checked other posts (maybe I missed a relevant one) and asked copilot for ideas.