Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to disable specific item in PowerApps gallery

Posted on January 21, 2024February 4, 2024 by Tom

“I’d like to only show some items in the PowerApps gallery, is there a way to disable only specific item, make it unselectable?”


When you use a PowerApps gallery, you’re setting behaviour for all the items. The whole gallery is either in a display mode or an edit mode; the items can be selected, or not. But what if you want to mix it up? If there’re some items that should be not possible to select? Yet the gallery doesn’t allow you to use ThisItem in any condition?

Use view mode only on a specific item

While you can’t use ThisItem for the condition directly, there’s a workaround by creating a group. Select all the controls in the gallery and group them. Once they’re in the group you can reference ThisItem to create the condition, e.g. disable RQ4 in the example below.

PowerApps gallery disable item

But that’s just the first part. Even though you changed the display mode on the item, it’s still possible to “select” it.

Make the item “unselectable”

Since you’re changing display mode only on the item and not the whole gallery, it’s still working with the Selected/IsSelected properties. You must bypass that, ignore them and replace it with your own functionality.

Replace gal.Selected with a variable

Instead of referencing the gallery, create a variable to store the selected item. If the item fits the condition, meaning it can be selected, store it in the variable. If not, do nothing, keep the original value in the variable.

PowerApps gallery disable item

Use this variable everywhere, every time you work with the selected item. Instead of gallery.Selected use the variable.

Replace ThisItem.IsSelected with a variable

Similarly, you want to get rid of the ThisItem.IsSelected in your application. As already mentioned, IsSelected can’t be disabled. And since it’s responsible for some of the gallery styling, even the disabled items might still appear as selected.

Use the search to find it in all the controls…

PowerApps gallery disable item

… and replace it using the variable. It’s a boolean value and as such replace it with a different condition – check if ThisItem is stored in the variable.

PowerApps gallery disable item

And that’s it. You just made some items in the gallery unselectable.

Summary

As you can see, it’s possible to disable an item in a PowerApps gallery with a workaround. You just have to bypass some of the default functionality of the gallery. Instead of referencing the selected item in the gallery, store it in a variable. Instead of checking if an item is selected, check if it’s in this variable. The gallery will still live it’s own life, selecting all the items you click on, but nothing will happen as the variable is what matters.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes