You can control this directly from the button’s OnSelect (or DisplayMode) using a simple condition based on the selected gallery item.
Assuming the status column from SharePoint is called Status and contains values like:
✅ Option 1 — Control navigation in OnSelect (recommended)
Set the button OnSelect to:
If(
ThisItem.Status = "Disponible",
Navigate(Screen2, ScreenTransition.Fade)
)
When the value is Reservada, nothing happens — no navigation.
✅ Option 2 — Disable the button when it’s “Reservada”
This gives better UX because the user clearly sees it’s not clickable.
Set DisplayMode of the button:
If(
ThisItem.Status = "Reservada",
DisplayMode.Disabled,
DisplayMode.Edit
)
Navigation stays normal in OnSelect:
Navigate(Screen2, ScreenTransition.Fade)
✅ Option 3 — Combine both (best practice)
DisplayMode
If(
ThisItem.Status = "Reservada",
DisplayMode.Disabled,
DisplayMode.Edit
)
OnSelect
If(
ThisItem.Status = "Disponible",
Navigate(Screen2, ScreenTransition.Fade)
)
This prevents navigation even if the button is triggered programmatically.
🔹 If your button is outside the gallery
Use:
Gallery1.Selected.Status
instead of ThisItem.Status.
Final behavior
| Status |
Button |
| Disponible |
✅ Navigates |
| Reservada |
❌ Disabled / No navigation |
This is the cleanest and most commonly used pattern in Power Apps galleries.