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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

Flex Office App

(0) ShareShare
ReportReport
Posted on by 691

Hello, I'm trying to create a rather complicated application on Power Apps. The purpose of my application is to reserve an office for a date.

 

I have a SharePoint list that looks like this:

s44_1-1662369204217.png

This SharePoint list stores all office reservations.
"Name" column: Type People Picker (Indicates the name of the person who booked the room)
"Date" column: Type Date (Indicates the date of the reservation, chosen on the calendar screen on power apps)
"Number_Office" column: Number type (Indicates the office number reserved by the user)

 

 

This is how my Power Apps app looks:


My first screen is a calendar screen. I would like that when the user clicks on the "Continue" button, it redirects him to the second screen so that he can reserve an office on the chosen date.

s44_0-1662389027505.png

 

 

 

The second screen contains an image of a room with several desks. When the user has chosen a date on the previous screen, I would like it to automatically redirect him to this page. To choose a desktop, I'd like them to simply click on a blue circle.

s44_3-1662369941672.png

 

 

Thank you in advance for your help. I can't get what I want at all 😞

Categories:
I have the same question (0)
  • Hii_iii Profile Picture
    691 on at

    .

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    In the OnChange property of the date control, use the Navigate function to go to the desired screen. The blue circles I imagine are buttons with the border-radius property at 100, right?

  • Hii_iii Profile Picture
    691 on at

    Yes that's it. But I don't know how to make it save the reservation in the SharePoint list just by clicking on the button @LuizVicente 

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    It's actually simple and there are several ways.
    For example, if you have a column in the SharePoint list called "SelectedRoom" (it is the column that will contain the selected room), you can save the data with the Patch function. It would be more or less like this:

     

     

     

    Patch(
     MySPList,
     Defaults(MySPList),
     {
     SelectedRoom: "Room 1", // -> Enter the room name for each blue button here.
     SelectedDate: DatePicker.SelectedDate
     // rest of your code
     }
    )

     

     

  • Hii_iii Profile Picture
    691 on at

    Thank you for your reply. But I don't quite understand where to write this code? @LuizVicente 

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    Oops.. sorry about that. You will put this code in the OnSelect property of each button.

     

    Roverandom_0-1662386156457.png

     

  • Hii_iii Profile Picture
    691 on at

    Sorry but it's doesn't work 😞 

    s44_0-1662387616355.png

     

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    The values inside the braces { } must be separated by commas.
    Hover over the code to understand what the error is.

  • Hii_iii Profile Picture
    691 on at

    In France it is with semicolons. 

     

    s44_0-1662388329460.png

     

    The error is this :

    The type of this argument "Date" does not match the expected type "Date". Type found "Error"

    @LuizVicente 

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    Right.
    Check the data type of the SharePoint column that will receive the date value.

     

    Roverandom_0-1662388589367.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard