Hey @JerryH, so I have good news and bad news. The bad news is that I couldn't find a way to use the disambiguation operator on the gallery reference. This means that the ForAll loop will only look at the first item in the gallery and never make it past that one. It also seems that it isn't possible to reference the GUID that Power Apps assigns. This part might not be too much of a problem as long as you have one unique value, like a device name or something, that you can reference. It would also work to use multiple items in the LookUp to define a row if one value isn't unique but two or more together are.
The good news is that doing what you are trying without the gallery reference isn't too difficult. Here's what I did:
On the checkbox control, I put the following items in the OnCheck and OnUncheck properties:
// OnCheck
Collect(colVerifiedDevices, ThisItem)
// OnUncheck
Remove(colVerifiedDevices, ThisItem)
This simply adds the row of data from the gallery into a collection called colVerifiedDevices if the box is checked and removes it if it is unchecked. I then used this collection in the ForAll loop instead of the gallery like so:
ForAll(
colVerifiedDevices,
Patch(
Devices,
LookUp(Devices, DeviceName = colVerifiedDevices[@DeviceName]),
{
Name: User().FullName,
Date: Now(),
Status: "Confirmed"
}
)
);
Clear(colVerifiedDevices)
I assumed that the name of the column with Test6, Test7, Test8, etc. was called DeviceName, so you will want to change that with the field name with the unique values.
If you need to use more than one field to define a unique row, it would look something like this:
ForAll(
colVerifiedDevices,
Patch(
Devices,
LookUp(Devices, Field1 = colVerifiedDevices[@Field1] && Field2 = colVerifiedDevices[@Field2]),
{
Name: User().FullName,
Date: Now(),
Status: "Confirmed"
}
)
);
Clear(colVerifiedDevices)
Just repeat the '&& Field# = colVerifiedDevices[@Field#]' for each additional field you need in there (where Field# is the column name of course).
One thing to note is the Clear(colVerifiedDevices) at the end of the ForAll Patch statement. This clears the collection out when the loop is done so those values aren't repeated.
I hope all of that makes sense but feel free to hit me up if it doesn't!