I have a gallery that references available desks from a SharePoint List and displays them all in a list. When a user selects on the check box next to the desk, it sets that as the chosen desk. All works great
Issue I have is that a user can select the checkbox next to any / all available desks if they want to. It always sets the chosen desk to be the last one they selected (and displays the chosen desk to the side along with date and user) but ideally if they select Desk A, they will not be able to select Desk B until they have deselected Desk A
Is this possible to do with galleries? Or do we just need to accept that is how they work and live with the fact that they will get a desk and it is showing them the desk name before they navigate to the next screen?
Solved! Go to Solution.
Here is what you can do...
Create a label OUTSIDE of your gallery - let's call it lblCheckCount (you can make it not visible).
Set the Text property of the Label to : CountRows(Filter(yourGallery.AllItems, yourCheckBox.Value))
Now, for the checkboxes in your Gallery, set the DisplayMode to the following:
If(Self.Value || (Value(lblCheckCount.Text)=0), DisplayMode.Edit, Disabled)
This will disable all the other Checkboxes if one is Checked. If the checkbox is then unchecked, all will become available to check another.
I hope this is helpful for you.
Here is what you can do...
Create a label OUTSIDE of your gallery - let's call it lblCheckCount (you can make it not visible).
Set the Text property of the Label to : CountRows(Filter(yourGallery.AllItems, yourCheckBox.Value))
Now, for the checkboxes in your Gallery, set the DisplayMode to the following:
If(Self.Value || (Value(lblCheckCount.Text)=0), DisplayMode.Edit, Disabled)
This will disable all the other Checkboxes if one is Checked. If the checkbox is then unchecked, all will become available to check another.
I hope this is helpful for you.
Amazing exactly what i was looking for, Thank you.
Great - worked a treat. Thank you for sharing!
Worked - thank you!
@RandyHayes This worked great! Would you say it's a similar way of disabling items in gallery that have a specific Criteria?
Hello,
I know it has been a few while.
I hope you can help me out.
Your solution works in my scenario only visually. If checkbox is ticked, other check boxes are greyed out, however, if gallery itself or other checkbox is then pressed, it resets the gallery and other check boxes become available again.
Testing - I apologies for the horrendous quality, can't screen capture on work laptop.
User | Count |
---|---|
155 | |
93 | |
82 | |
77 | |
58 |
User | Count |
---|---|
195 | |
175 | |
103 | |
96 | |
89 |