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 / How to stop a user boo...
Power Apps
Unanswered

How to stop a user booking 2 appointment slots

(0) ShareShare
ReportReport
Posted on by

Hi, I hope someone can assist.

 

I have built an appointments booking PowerApp, which feeds from a SharePoint list. 

The user goes into the app, clicks the new button and then this will navigate to 'find an appointment' screen with a gallery of available appointments. 

On the new button I added the below, so if they already have an appointment booked, it does not allow them to book another and will take them to the 'Already Booked Screen', where they can see their current appointment on the gallery. 

 

If(CountRows(gal_bookings.AllItems) > 0, Navigate(AlreadyBookedScreen),

Navigate(FindAnAppointmentScreen));

 

However, when you first log into the app and click the 'new' button, even if the user already has an appointment booked, it still navigates to the 'find an appointment' screen. It's only when you go back, it then realizes that the user already has one booked and if you click new again, it would then navigate to the 'Already Booked Screen'.

 

I tried adding 'Refresh(SP List name)' but still experiencing the same issue. 

 

Does anyone have any suggestions please? 

 

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    My suggestion if or you to do something like this:

    If(

    IsBlank(LookUp(YourDataSource; AppointmentUser.Email = User().Email));

    Navigate(FindAnAppointmentScreen);

    Navigate('Already Booked Screen')

    )

     

    So, do a LookUp in your datasource and the condition must be something related to the user (email, id, displayname, whatever you use in your datasource).

     

    Check if it is blank or not and based on that, navigate

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard