Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Reservation App- Filter Gallery to show only available

Posted on by 2

Hello! 

 

I am working on a kit reservation application. We have 2 SP lists - one is a list of the kits & one is a list of the reservations. When users enter the app, they choose a check in and check out date. I want my gallery to filter and show only kits that are available during their selected days- this is the function I am using, and it is not filtering correctly. Sometimes it shows the kits that are available, or it might pull a random unrelated kit out of the list. Any help would be appreciated! 

 

 

Filter(
'EV Marketing Kits & Descriptions',
Not(
Title in Filter(
'EV Marketing Reservation',
CheckOutFrom >= startDate && CheckOutTo <= endDate || CheckOutFrom <= endDate && CheckOutTo >= endDate
).EVMarketingKit1
)
)

 

EV Kits and Descriptions - SP list of kits 

EV Marketing Reservation- list of reservations 

Checkout From / CheckOutTo - columns in reservation SP list 

start date- variable being set on start date picker 

end date- variable being set on end date picker 

Title- title column in EV Kits and Descriptions SP list 

EVMarketingKit1- Kit name column in Reservation SP list

  • Kenziesaitta Profile Picture
    Kenziesaitta 2 on at
    Re: Reservation App- Filter Gallery to show only available

    I am trying to accomplish something similar; this formula has no errors but rather just leaves the gallery empty. 

  • Prabhakar_S Profile Picture
    Prabhakar_S 736 on at
    Re: Reservation App- Filter Gallery to show only available

    Hi @anbates ,

     

    Give this a try,

     

    Filter(
    'EV Marketing Kits & Descriptions',
    IsEmpty(
    Filter(
    'EV Marketing Reservation',
    Title = 'EVMarketingKit1' &&
    (
    (CheckOutFrom >= startDate && CheckOutFrom <= endDate) ||
    (CheckOutTo >= startDate && CheckOutTo <= endDate) ||
    (CheckOutFrom <= startDate && CheckOutTo >= endDate)
    )
    )
    )
    )

     

    I hope this helps.

     

    Thanks!!!

  • anbates Profile Picture
    anbates 2 on at
    Re: Reservation App- Filter Gallery to show only available

    Thank you for your help! 

     

    This is sending an error saying that isBlank has invalid arguments. Any thoughts?

  • Prabhakar_S Profile Picture
    Prabhakar_S 736 on at
    Re: Reservation App- Filter Gallery to show only available

    Hi @anbates ,

     

    Try this formula,

     

    Filter(
    'EV Marketing Kits & Descriptions',
    IsBlank(
    Lookup(
    'EV Marketing Reservation',
    Title = 'EVMarketingKit1',
    (
    (CheckOutFrom >= startDate && CheckOutFrom <= endDate) ||
    (CheckOutTo >= startDate && CheckOutTo <= endDate) ||
    (CheckOutFrom <= startDate && CheckOutTo >= endDate)
    )
    )
    )
    )

     

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

     

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,651

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,727

Leaderboard