Looks like you're dealing with a situation where you have multiple events, and for each event, you have a set of items that can be checked or unchecked independently. Your current setup seems to be using one collection to handle all the events, but since you want different behavior for each event, you need to manage these states separately.
Create separate collections for each event
You can use a different collection for each event, and when you navigate to an event detail page, you can clear the collection and repopulate it with the required details for that specific event.
Patch the selected items with the required status on submit
When the submit button is clicked, you can use the Patch function to update the SharePoint list with the required status.
Below are the updated formula examples:
In App.OnStart
Instead of populating the collection at the start, you can do this when you navigate to an event. This way, you can ensure that every time you view an event, the checkboxes start unchecked.
On View Button Click for Event
When you click the View button for an event, you can execute the following
(using OnSelect property of your View Button😞
ClearCollect(
colListData1,
AddColumns(
Filter(YourSharePointList, EventID = selectedEventID),
"checkBoxVal",
false
)
)
Navigate(EventDetailScreen, ScreenTransition.None)
Replace YourSharePointList with your SharePoint data source and selectedEventID with the ID for the event you're viewing.
Gallery Items Property
You have this part correct. No change is required here.
Gallery Checkbox OnCheck and OnUnCheck
The formulas you have for these functions should be appropriate as well.
On Submit Button Click
You can use the following to update the SharePoint list
(OnSelect of your Submit Button):
ClearCollect(
colBaseRecs,
DropColumns(
Filter(colListData1, checkBoxVal = true),
"checkBoxVal"
)
)
ClearCollect(
colChangeRecs,
ForAll(
colBaseRecs,
{Status: "Ready for Purchase"}
)
)
Patch(
YourSharePointList,
colBaseRecs,
colChangeRecs
)
Replace YourSharePointList with your SharePoint data source.
With these modifications, every time you navigate to an event detail screen, the items should start unchecked, and when you submit, the selected items will be patched with the required status.
See if this helps @Iantaylor2050