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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Nested filter for book...
Power Apps
Unanswered

Nested filter for booking Car

(0) ShareShare
ReportReport
Posted on by

Hi everyone!

 

I am pretty new to power apps and I want to create a car booking system.

I'm having trouble when I want to view the cars available for reservation based on the dates entered by the user.

 

Here's the Scenario:

In my application I have 2 sharepoint data lists. In one of this list I have all the car master data and in the other list I have all the reservations made.

For example, I have a situation like this with all the car master data. (to simplify the list I indicate only the car plates)

AJ737KI
JY666HT
FR888TT
GG333EE
BB098UI

 

And also I have this situation with all bookings made

 

Car platesStart bookingEnd booking
JY666HT20/02/202323/02/2023
GG333EE22/02/202327/02/2023

 

I would like this situation: if the user wants to book a car with a start booking like 16/02/2023 and an end booking like 22/02/2023 he must only view these data

 

AJ737KI
FR888TT
BB098UI

 

But the filter I built is not working. I understood that I have to use two nested filters, since I have to take all the reservations contained in the dates entered by the user, take the car plate data and use it as a value key to exclude it from my master data.

Here's my filter:

 

Filter('Car Master';
Not(Plates in Filter(
'Car Reservation';
START_DATE_RESERVATION < Start_date_Book_User && START_DATE_RESERVATION < End_date_Book_User
).Plates))

 

What am I doing wrong? I'm wasting a lot of time on this issue. Please help me. Thank you

Categories:
I have the same question (0)
  • mmollet Profile Picture
    3,187 on at
    Re: Nested filter for booking Car

    Try using something like this:

    Filter(yourSPListHere, Now() > start_date_book_user, Now() < end_date_book_user)

    In english: Filter the SP list named 'yourSPListHere' to display entries only if Current Date/Time is greater than the start time of the booking AND if the current Date/Time is less than end time of the booking.

     

    If this works as a solution please mark is as such for others to more easily find!

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Nested filter for booking Car

    Hello mmollet,

     

    Thank you for the support. I decided to go in this way:

     

    This solution might be useful for someone looking for something like this.

     

    When I select the start booking and end booking dates, I collect all the bookings that have been made in the range of the selected dates.

    Collect(CarBooking;Filter('Car Reservation';(START_DATE_RESERVATION >= Start_date_Book_User && START_DATE_RESERVATION <= DateTimeValue(End_date_Book_User)) || (START_DATE_RESERVATION < Now() && END_DATE_RESERVATION > Now())))

     And then I do a filter on my Car Master list using the collection that I created earlier with the date selection.

    Filter('Car Master';Not(Plates in CarBooking.Plates))

     

    Thank You!

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 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard