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 / Desk Booking Starttime...
Power Apps
Unanswered

Desk Booking Starttime and endtime not recording properly

(0) ShareShare
ReportReport
Posted on by 6

I have a bug with the Desk Booking canvas app where when a desk is booked and the starttime and endtime are selected, lets say from 08:00 to 16:00 and when confirming it shows correct on the confirmation screen

MikeHowarth_0-1626892798827.png

 

but when the record is created in the sharepoint list it records as 00:00 to 00:00.

I have noticed that when i check the value in the confirm button it shows 21:07/2021 08:00:00 so the time is showing seconds which i presume the sharepoint list is not handling properly and taking the last 4 values i.e. 00:00

MikeHowarth_1-1626892904169.png

 

Has anyone come across this or know how to resolve?

I only have basic Powerapps knowledge 🙂

 

Regards
Mike

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

    Looks like we need to convert the date time to the desired format like

     

    Text(somedatevalue, "dd/mm/yyyy hh:mm AM/PM")

     

    Convert the Start and end DateTime

    StalinPonnusamy_0-1626927512111.png

     

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @MikeHowarth 

     

    Use this code but you will need to modify you List columns as fellows as I am using myself and is working perfect  here the details give it go and let me know if you need any assistance or a questions feel free. 

     

    From PowerApps

    CaptureSolved.PNG

     

    Reserved Time and date recorded correctly 

     

    CaptureSolvedTime.PNG

     

     

     

    Used this formula to Patch 

     

    ForAll(
     selectedDesks,
     Patch(
     'Desk Reservations List',
     Defaults('Desk Reservations List'),
     {
     Title: currentUser.FullName & " " & ThisRecord.Title,
     DeskText: ThisRecord.Title,
     'Check Out From': DateAdd(startTime, TimeZoneOffset(), Minutes ),
     'Check Out From Text': startTime,
     'Check Out From Number':Value(Text(startTime,"yyyymmddhhmm")),
     'Check Out To': DateAdd(endTime, TimeZoneOffset(), Minutes ),
     'Check Out To Text': endTime,
     'Check Out To Number': Value(Text(endTime,"yyyymmddhhmm")),
     Reserved_x0020_By: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & currentUser.Email,
     Department: "",
     DisplayName: currentUser.FullName,
     Email: currentUser.Email,
     JobTitle: "",
     Picture: ""
     }
     }
     )
    );
    Concurrent(
     Reset(ddTimeTo),
     Reset(ddTimeFrom),
     Reset(Calendar_1),
     Reset(cbDeskSelect),
     Clear(selectedDesks),
     Set(
     selectedDate,
     Blank()
     ),
     Set(
     startTime,
     Today()
     ),
     Set(
     endTime,
     Today()
     )
    );
    Navigate(Success)

     

     

    Here what you need to do 

     

    Desks List

     

    CaptureNames.PNG

     

    Desk Reservations List

     

    CaptureDeskRes.PNG

     

     

    Let me know 

  • Meazig Profile Picture
    6 on at

    Hi, I have the same app set up but I am trying to fix the end time to not be before my start time. Right now if I pick 3/16/22 1pm to 10am I am able to book it. Any help on validation is appreciated.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Ramole ,

     

    This code is not working properly when multiple dates are selected.

    For example User 1 has booked seat no1 from Jun 5 to Jun 10th from 10 AM to 6 PM.  

    User 2 is trying to book seat from Jun 7 to Jun 10 from 10 AM to 6 PM. 

    In the above case Seat 1 should not be visible as its already been booked by user 1.

    In the above code user1 and even user2 is able to see seat1 from Jun 7 to Jun 10.

    Can yu please help me on this.

     

    Thanks in Advance !

     

  • raassd Profile Picture
    56 on at

    Hi @Ramole ,

    This code is perfectly working, when I am trying to filter the empty desk when user selected daterange then my values are not correct can you please help me on this 

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    @raassd 
    no problems I message you later once I am on desktop

     

  • raassd Profile Picture
    56 on at

    @Ramole ,

    I am waiting for you help !

     

     

    Thanks !

     

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 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard