HI @Anonymous ,
Do you want to use variables to control the visible of the two buttons within your Gallery?
I agree with @Pstork1 's thought almost. The variables you set up within an app would be scoped to current screen (Context variable) or the whole app (Global variable). If you use the variable to control the visible of the two buttons, once the variable changes, all related items which references the variale would be affected within your Gallery.
As an alternative solution, you could consider add a column (Called "Status") within your data source to store the clickable status value. When you click one of the two buttons within your Gallery, update the "Status" column value based on the clicked button. Then visible the two buttons based on the "Status" column value.
I assume that you add a "Status" column (Text type column, default value is Blank) in your data source, when you click the first button, update "Complete" value to the "Status" column in your data soufce.
I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the First button in your Gallery to following:
Patch(
'YourDataSource',
ThisItem,
{
Status: "Complete"
}
)
Set the Visible property of the First button to following:
If(
IsBlank(ThisItem.Status),
true,
false
)
Set the Visible property of the Second Button in your Gallery to following:
If(
ThisItem.Status = "Complete",
true,
false
)
Please consider take a try with above solution, then check if the issue is solved.
More details about the Patch function, please check the following article:
Patch function
Best regards,