Morning all,
(Is morning here in the UK)
I've used April's Desk booking app, which is brilliant, but I want to add some extra functionality to the Power App
On the screen I have it links to the gallery, and I it has three fields (unchanged from Aprils version really)
To clarify none of this is in the data verse, it is all a Power App, with a SharePoint back end.
What I want to do is have a label underneath the date field. Where when you select the date It checks the date, and tells you how busy the office is for example. 27 desks are booked. I can then show the user how busy the office is.
I thought this would be possible as the desks have either a "blank state", "booked", "checked in" status. So it would be searching the date first, which would never bring back more than 500 records, 30 tops, and then bring back a number of desks booked, or checked in for that date.
I'm quite comfortable with gallery searches but this is bringing back a count, and cross checking it. Something I've not tried before
*Also should this calculation be done in the SharePoint list, or done within the Power App?
Thanks 🙂
Hi @Theoriginal1981,
The previous formula could be used to create a collection. You can then check if a certain desk number is in that collection, or you can filter your list of desks to only show ones that aren't in that collection (and therefore are available).
How are you trying to display this information? If you can explain how you are hoping to show this information I may be able to help further.
That worked a treat in calculating the number. Still can’t get it to work out which desks are available out of those booked. That but has me stumped
Hi @Theoriginal1981,
I haven't tested it but tweaking my previous formula I think you should be able to use 2 dates with the following formula:
With(
{
dateRangeBookings: Filter(
<BOOKING LIST>,
'Booking Date' >= DateFrom.SelectedDate And 'Booking Date' <= DateTo.SelectedDate And (Status.Value = "Booked" Or Status.Value = "Checked In")
)
},
CountRows(dateRangeBookings)
)
I think this should give you a count of all the bookings within the the two selected date fields (DateFrom & DateTo).
@SharePointJB Thanks for the update. I have posted another thread, with the full explanation of what I'm trying to achieve. Just not sure if it's possible. Your solution would work, but I need it to work between two dates.
I've posted the latest one here, if you could have a look that would be hugely appreciated
Desk Booking - Searching between dates for availab... - Power Platform Community (microsoft.com)
Yeah I have used a normal date picker. I've not had chance to edit it at the moment, works gone a little busy. Once I get a moment to check it I will let you know 🙂
Hi @Theoriginal1981,
Assuming you are using a date picker you can set the text value of a label to the following formula and it will update to show how many desks are "booked" or "checked in" for the selected date:
With(
{
todaysBookings: Filter(
<BOOKING LIST>,
'Booking Date' = DatePicker1.SelectedDate And (Status.Value = "Booked" Or Status.Value = "Checked In")
)
},
CountRows(todaysBookings)
)
You will need to replace <BOOKING LIST> with the relevant list holding the bookings and change 'Booking Date' and Status.Value (this is assuming Status is a choice field) with the relevant SharePoint list fields.
Hope that helps!
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1