web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Disabling a button bas...
Power Apps
Answered

Disabling a button based on a icon

(0) ShareShare
ReportReport
Posted on by 78
Hello
I have a gallery where an icon appears ie(>) depending on if the item question has a number. If the item question does not have a number the icon doesn’t appear.
The above part works . What I need is that when the icon appears the button which is on the screen is disabled . I’ve tried so many things . I tried on the on visible property of the icon to set a variable but it won’t let me . Any clues.

Thank you so much to all of you
Categories:
I have the same question (0)
  • hnguy71 Profile Picture
    347 on at

    hmmm you can use a variable or text control inside the gallery to disable the button.

     

    If I were to imagine you doing it, I would create a text label inside the gallery and call it txt_icoValidate then in it's text property have something, say: IF(!ISBLANK(itemQuestion), true, false). Then within the button's OnSelect property you can put something like: IF(txt_icoValidate.Text = true, false, Do_Action_On_Select)

  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    Is the button inside the gallery or outside of the gallery? 

  • Marco Pezzutti Profile Picture
    78 on at

    Hello

    This button is outside the gallery

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @mpezzutti ,

    Could you please share a screenshot about your app's configuration?

    Do you want to disable the button within your screen when the icon appears within the selected item in your Gallery?

    Further, could you please share a bit more about the formula you used to control the icon's visibility?

     

    If you want to disable the button within your screen when the icon appears within the selected item in your Gallery, I think it is not necessary to initialize/set additional variable to set the Display mode of the button outside the Gallery. You could still apply the check condition (you used within the "icon" within your Gallery) to the button.

     

    I have made a test on my side, please take a try with the following workaround:6.JPG

    Set the DisplayMode property of the button to following:

    If(
    !IsBlank(Match(BrowseGallery1.Selected.Executor.DisplayName, "\d").FullMatch), /* <-- Check if the DisplayName property of Executor column contains a Number */
    DisplayMode.Disabled,
    DisplayMode.Edit
    )

    On your side, you should type the following:

    If(
     !IsBlank(Match(BrowseGallery1.Selected.ColumnName, "\d").FullMatch), /* <-- Check if the ColumnName contains a Number */
     DisplayMode.Disabled, 
     DisplayMode.Edit
    )

    Note: The ColumnName represents the column you want to check if it contains a Number value. The BrowseGallery represents the Gallery control in your app.

    You may also type following:

    If(
     "The Check condition formula you used to within your Icon in your Gallery", /* <-- Check if the ColumnName contains a Number */
     DisplayMode.Disabled, 
     DisplayMode.Edit
    )

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    on at

    Hi @mpezzutti how are you progressing with this? Was the above reply helpful?

     

    @Anonymous 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard