Hi @powerapps890 ,
Change it as below:
Collect(collCheckBoxes,{SelCheckBoxID:"Checked"})
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Proud to be a Super User!
Regards,Another approach you might consider...a Toggle control.
Place a toggle control on your screen (not in your Gallery) - let's call it tglMaxChecks. Set the Default Property to:
CountRows(Filter(YourGalleryName.AllItems, yourCheckBoxControl.Value))>9
On your Checkbox Control in your Gallery, set the DisplayMode to the following:
If(!tglMaxChecks.Value || YourCheckBox.Value, DisplayMode.Edit, Disabled)
This will allow your users to check 10 checkboxes. Once they check 10, the checkboxes will go "disabled", except for the ones already checked (so they can uncheck if they desire).
Just another approach but no variables or collections needed.
EDIT: Oh, and you would also want to make the Toggle Visible property false.
Hi @powerapps890 ,
on default use:
If(ThisItem.Title in Filter('CCB Voting','Created By'.Email = varUser.Email).Title || ThisItem.ID in TempCollection.Value, true,false)
on DisplayMode use this:
If(
(CountRows(TempCollection)<10 && CountRows(Filter(
'CCB Voting',
'Created By'.Email = varUser.Email
)) < 10),
DisplayMode.Edit,
If(
If(
ThisItem.Title in Filter(
'CCB Voting',
'Created By'.Email = varUser.Email
).Title,
true,
false
) || If(
ThisItem.ID in TempCollection.Value,
true,
false
),
DisplayMode.Edit,
DisplayMode.Disabled
)
)
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Proud to be a Super User!
Regards,
Every time check box is checked or unchecked - load the information to a collection.
Then check collection count using CountRows function and apply the logic to disable your checkboxes.
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
Hi @powerapps890 ,
just to elaborate on what @RezaDorrani advised, do the below steps:
Collect(collCheckBoxes,{selCheckBoxID:ThisItem.ID})
if(CountRows(collCheckBoxes)=10,DisplayMode.Disabled,DisplayMode.Edit)
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Proud to be a Super User!
Regards,Hi @powerapps890 ,
Change it as below:
Collect(collCheckBoxes,{SelCheckBoxID:"Checked"})
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Proud to be a Super User!
Regards,Another approach you might consider...a Toggle control.
Place a toggle control on your screen (not in your Gallery) - let's call it tglMaxChecks. Set the Default Property to:
CountRows(Filter(YourGalleryName.AllItems, yourCheckBoxControl.Value))>9
On your Checkbox Control in your Gallery, set the DisplayMode to the following:
If(!tglMaxChecks.Value || YourCheckBox.Value, DisplayMode.Edit, Disabled)
This will allow your users to check 10 checkboxes. Once they check 10, the checkboxes will go "disabled", except for the ones already checked (so they can uncheck if they desire).
Just another approach but no variables or collections needed.
EDIT: Oh, and you would also want to make the Toggle Visible property false.
This works, but every time I use my filter I can then select 10 checkboxes filtering on that whereas I want 10 checkboxes allowed in the entire app. I also already have data from previous answers populated. Including those I want the user to have to uncheck them to make additional selections. This only works for me if I don't filter. @RandyHayes @KrishnaV
Hi @powerapps890 ,
on default use:
If(ThisItem.Title in Filter('CCB Voting','Created By'.Email = varUser.Email).Title || ThisItem.ID in TempCollection.Value, true,false)
on DisplayMode use this:
If(
(CountRows(TempCollection)<10 && CountRows(Filter(
'CCB Voting',
'Created By'.Email = varUser.Email
)) < 10),
DisplayMode.Edit,
If(
If(
ThisItem.Title in Filter(
'CCB Voting',
'Created By'.Email = varUser.Email
).Title,
true,
false
) || If(
ThisItem.ID in TempCollection.Value,
true,
false
),
DisplayMode.Edit,
DisplayMode.Disabled
)
)
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Proud to be a Super User!
Regards,User | Count |
---|---|
229 | |
100 | |
97 | |
56 | |
33 |
User | Count |
---|---|
280 | |
110 | |
109 | |
64 | |
62 |