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:
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,