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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Don't navigate into a ...
Power Apps
Answered

Don't navigate into a screen if information is equal to "Reservada"

(2) ShareShare
ReportReport
Posted on by 943 Season of Giving Solutions 2025
Hi!
 
So I have a gallery with different rows that shows information from SP list, and in the right side there is a button that navigates into another screen. So I want if one of the information is "Reservada", the button doesn't navigate, and if it's "Available" it navigates correctly.
How could I add that into the button?
Look how the first screen looks:
So I want that if its "Reservada", when clicking that button, doesn't navigate to next screen, just when it's Disponible.
Categories:
I have the same question (0)
  • Verified answer
    Haque Profile Picture
    3,653 on at
    Hi @Charlie Martharper,
     
     
    OnSelect property of the button is your friend in this case.  As the button sits inside the gallery, you can reference the current row using ThisItem.
     
    If(
        ThisItem.Status = "Available",
        Navigate(DetailScreen, ScreenTransition.Fade),
        Notify("This item is reserved and cannot be opened.", NotificationType.Warning) // if you want any notification
    )
    
    Assuming you are checking against Status column of your SP list recrod. Hence, ThisItem.Status is checking column.  I have produced a similar feature for mine, i think it will help you.
     
    Code example
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Please mark as answered if it helps.
  • Verified answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
     
    Please try below code:
    If(
        ThisItem.Estat.Value = "Available",  //ThisItem.Estat.Value - Replace it with your column name. Update the option according to your setup.
           Navigate(Dashboard_Screen,ScreenTransition.None);, //Dashboard_Screen - Replace with your screen name
           Notify("Already Reserved!",NotificationType.Warning) //Already Reserved! - Replace with your error message
    );
    
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention@Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
  • Suggested answer
    Umesh Dinkarrao Baradkar Profile Picture
    6 on at
    Hello @Charlie Martharper,

    Approach 1: Here user aware and will avoid accident click 
    On your Button DisplayMode Property Add below formula :
    If(
        ThisItem.Status = "Reservada", //replace with your column name
        DisplayMode.Disabled,
        DisplayMode.Edit
    )

    OnSelect property code should be:
    If(
        ThisItem.Status = "Reservada",
        Notify("Already reserved", NotificationType.Error),
        Navigate(DetailScreen)
    );

    For best practice use Tooltip 
    If(
        ThisItem.Status = "Reservada",
        "This slot is already reserved",
        "Click to navigate on screen"
    )
    Approach 2: Here the user will click, but instead of nothing happening, at least a notification should explain why they are not navigated to the screen.
    If(
        ThisItem.Status = "Reservada",
        Notify("The screen will open only when the status is available.", NotificationType.Warning), // if you want any notification
        Navigate(DetailScreen, ScreenTransition.Fade)
    )
    
     
  • Charlie Martharper Profile Picture
    943 Season of Giving Solutions 2025 on at
    The problem is, if I click on the data, it navigates into the other screen. So if they don't click on the button, and click on the full information gallery, it will go there anyway.
    Should I change this?
    Ok its solved, I changed it to "false" and nothing happens. 
    Thanks!!
  • Suggested answer
    VASANTH KUMAR BALMADI Profile Picture
    322 on at

    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:

    • Reservada

    • Disponible

    ✅ 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.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard