How to limit number of checkbox selections in a gallery?

Summary

This is text version of the video by Daniel Christian.

#1 Add a Gallery control Gallery1

#2 Add a Check Box control in the Gallary

#3 Remove the border of the checkbox

#4 Add a Label control name it “CountLabel”. Add Text property formula.

// The formula will get all items in the galley and filter by checked checkboxes.
CountRows(Filter(Gallery1.AllItems,Checkbox1.value))

#5 Add DisplayMode formula as

If(Self.Value || (Value(CountLabel.Text) = 0), DisplayMode.Edit, Disabled)

About Pankaj

I am a Developer and my linked profile is https://www.linkedin.com/in/pankajsurti/
This entry was posted in Power Apps. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s