pls try the following:
Instead of creating multiple collections, structure a single collection
Use the ForAll and Collect functions to dynamically generate a single collection for all persons.
// Define persons and checklist items
ClearCollect(
ChecklistCollection,
ForAll(
Sequence(15), // 15 persons
ForAll(
["Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9", "Item 10"], // Checklist items
{
PersonID: Value, // Current person from Sequence
ChecklistItem: Value, // Current checklist item
ItemChecked: false // Default unchecked
}
)
)
);
Bind the checklist collection to a Gallery control. Use filtering to show items for each person.
Distinct(ChecklistCollection, PersonID)
Add another gallery inside the person gallery to show checklist items for the selected person
Filter(ChecklistCollection, PersonID = ThisItem.PersonID)
Add a toggle switch or checkbox to update the ItemChecked column
Patch(
ChecklistCollection,
ThisItem,
{ItemChecked: !ThisItem.ItemChecked}
)
To identify and display missing checklist items for each person, filter the collection where ItemChecked is false:
ForAll(
Distinct(ChecklistCollection, PersonID),
Collect(
MissingNotes,
{
PersonID: ThisRecord.PersonID,
MissingItems: Concat(
Filter(ChecklistCollection, PersonID = ThisRecord.PersonID && !ItemChecked),
ChecklistItem,
", "
)
}
)
);
lot of steps, pls let me know if you still have issues!