Hi @HendrikKl :
Could you tell me:
- What is the gallery's items properyt?Is it 'sport'?(I assume it is sport)
Firstly,let me explain why the checkbox jumped directly back to unchecked.
The point is the checkbox's selection is not saved.When the data of the data source is changed, the Gallery including the controls in the Gallery will be reset. If you do not save the value of the checkbox, it will be reset to the state of UnCheck.
Secondly,Please try this solution:
1\Set the CheckBox's OnCheck property to:
Collect(TeilnehmerList,ThisItem);
Collect(Selections,{ID:ThisItem.ID,Selection:true}); /*Selections is my custom collection*/
Patch(sport,(LookUp(sport,ID=ThisItem.ID)),{'Teilnehmer Anzahl':ThisItem.'Teilnehmer Anzahl'+1});
2\Set the CheckBox's OnUncheck property to:
Remove(TeilnehmerList,ThisItem);
Remove(Selections,{ID:ThisItem.ID,Selection:true});
Patch(sport,(LookUp(sport,ID=ThisItem.ID)),{'Teilnehmer Anzahl':ThisItem.'Teilnehmer Anzahl'-1});
3\Set the CheckBox's Default property to:
LookUp(Selections,ID=ThisItem.ID).Selection

Best Regards,
Bof