cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mitchelvdh
Helper I
Helper I

Filter Choices that aren't booked

Hi there,

We have an desk reservation app where users can book an desk. We currently have two SharePoint lists:
- Reservations (id, gekozenBureau (chosen desk), gekozenRuimte (chosen room), gekozenDagdeel (chosen daypart)).

This is the list where we save our reservations.

- Werkplekken (desks) - (id, ruimtenaam (room name), bureau (desk))
This is the list where the desks are defined.

Currently we have a gallery (items) with the available desks that are not booked yet:

With(
   {
      vPlekken:
      Filter(
         werkplekken2, // desk list
         LOCATIE = locatie_search.Selected.Result && // location
         VERDIEPING = etage_search.Selected.Result && // floor
         RUIMTENAAM = room_search.Selected.Result // roomname
      ),
      vReserv:
      Filter(			
         Reservaties2, // reservation list
         reservatieDatum = datum_kiezen.SelectedDate // reservation date equals chosen date in date picker
      )
   },
   Filter(
      vPlekken,
      !(BUREAU in vReserv.gekozenBureau) // output all the available desks by BUREAU (desk list) that can't be found in the reservation list)
   )
)

This is totally working fine, but now I want to add the ability to book a part of the day. We have three options:
- The whole day
- Morning
- Afternoon

I've created an extra column (Choice) on the Reservation list, gekozenDagdeel (chosen daypart) with the values described above.

In the gallery with the available desks I've added an radio control for each available desk:

Mitchelvdh_0-1650456342452.png


Can somebody help me out filtering the radio button items dynamically or lead me in the good direction? For example;
Somebody booked the morning, then it checks the reservation list which is booked for the specific desk and date and what part of the day. So it should only output the afternoon since the morning and the whole day are already 'booked'?



1 REPLY 1
Mitchelvdh
Helper I
Helper I

Bump

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,172)