@TimmyBoy ,
I have spent about an hour on this on a model, so will give you what I have - it seems to work, but I will have to leave it to you to play with, understand and finish (you may have different references depending on your Gallery Items)
Firstly, you need to initiate a Collection - Screen OnVisible or whenever you want to start the selection again
ClearCollect(
colItems,
Table({Value: Blank()})
);
Clear(colItems)
Now on the OnSelect of your checkbox
Clear(colSelect);
If(
CountRows(
Filter(
Gallery3_2.AllItems,
CheckBoxName.Value
)
) = 0,
ClearCollect(
colSelect,
MyData
),
ForAll(
Filter(
Gallery3_2.AllItems,
CheckBoxName.Value
) As aSel,
Collect(
colSelect,
Filter(
MyData,
!(aSel.Value in Nota.Value) && !(aSel.Value in colItems.Value)
)
);
Collect(
colItems,
{Value: aSel.Value}
)
)
)
and your Label
"(Results " & CountRows(colSelect) & ")"
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps