cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GideonTA
Frequent Visitor

Visible Property to false / DisplayMode to Disabled

I have a gallery with Items from SharePoint in PowerApps and would like the Confirm button to be Disabled until the User selects an Item or only 1(one) Item in the gallery. I have tried everything and still not working. Help!
Button is labeled btnConditions and Gallery is galConditions.

WellCheck.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

After the patch reset the gallery.

 

Patch(...);Reset('GalleryName')



--------------------------------------------------------------------------------
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.

View solution in original post

4 REPLIES 4
Jeff_Thorpe
Super User
Super User

Here is a way to disable the button until an item is selected. You will need to replace gallery with the name of your gallery and Title with the name of a text field in the gallery.

 

Property Formulas:

Gallery > Default > {}

Confirm > DisplayMode > If(IsBlank(Gallery.Selected.Title), DisplayMode.Disabled, DisplayMode.Edit)

 



--------------------------------------------------------------------------------
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. It works when I first apply the code however, after deselecting an option in the gallery, the Confirm button is still enabled instead of being disabled. Also, after pressing Confirm to Patch the record, when I come back to the screen the Confirm button is enabled without selecting any option in the gallery.

Jeff_Thorpe
Super User
Super User

After the patch reset the gallery.

 

Patch(...);Reset('GalleryName')



--------------------------------------------------------------------------------
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.

Worked, thanks.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,895)