Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Expand available parking spaces and parking spaces with specific period

(0) ShareShare
ReportReport
Posted on by 58

Hello everyone,
I'm currently pondering over a filter function that's difficult for me and I'm hoping someone can help me.

 

To the background:
I have two lists:

1. Parking spaces: All parking spaces are listed here
2. Reservations: The dates defined for the parking spaces are saved here.

 

So that only the parking spaces available on a given day are displayed in the list, I have defined the following filtering above the corresponding gallery:

 

Filter(Parkplätze;Not(Parkplatznummer in Filter(Reservierungen;Startzeit>=startTime && Endzeit <=endTime||Startzeit<=endTime &&Endzeit>=startTime).Parkplatznummer ||'Aktiv?'="Nein"))

 

startTime and endTime are global variables where I store the selected dates and times to compare with the dates and times stored in  the "Reservations" list. In addition, I have defined a yes/no column "Active" in the "Parking spaces" list, which searches for whether a parking space has been set to active. This is the final part of the filtering and it has worked very well so far.

 

Now a new function will be added: There will be parking spaces that are only available at certain times. To do this, I defined the “Start” and “End” columns in the “Parking spaces” list.

 

According to an example, the filtering should work as follows:

I have a P1 parking space that is only available from April 1st, 2024 to April 5th, 2024. All other parking spaces that have not yet been reserved should be displayed by April 1st, 2024. From 01.04. until April 5th The parking lot P1 will then also be displayed. And if April 6th. then P1 should no longer be displayed.

 

How do I expand the filtering so that this additional parking space is shown to me?


Thanks in advance and best regards

 

Categories:
  • Masakichi123 Profile Picture
    58 on at
    Re: Expand available parking spaces and parking spaces with specific period

    Nobody has an idea? 😞 I'm a little desperate...

  • Masakichi123 Profile Picture
    58 on at
    Re: Expand available parking spaces and parking spaces with specific period

    I almost have it:

     

    Filter(Parkplätze;Not(Parkplatznummer in Filter(Reservierungen;Startzeit>=startTime && Endzeit <=endTime||Startzeit<=endTime &&Endzeit>=startTime).Parkplatznummer ||'Aktiv?'="Nein" ||Beginn>=startTime && Ende <=endTime || Beginn>=endTime &&Ende>=startTime))

     

    The start date is already displayed correctly; However, the end date is still displayed even if a date further in the future is selected. How do I have to adjust the formula above so that the end date can also be filtered correctly?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard