cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mpezzutti
Level: Powered On

Disabling a button based on a icon

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
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Disabling a button based on a icon

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 Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
hnguy71
Level 8

Re: Disabling a button based on a icon

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
Level 10

Re: Disabling a button based on a icon

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

mpezzutti
Level: Powered On

Re: Disabling a button based on a icon

Hello

This button is outside the gallery

Community Support Team
Community Support Team

Re: Disabling a button based on a icon

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 Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

TopShelf-MSFT
Level 10

Re: Disabling a button based on a icon

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

 

@TopShelf-MSFT 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,804)