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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery Filter linked ...
Power Apps
Answered

Gallery Filter linked to another sharepoint list

(0) ShareShare
ReportReport
Posted on by 5

Hello,

 

I need help with a Powerapps gallery, where I have a sharepoint list with data on the cars available in the company (one of each, the license plate being the unique ID) and the other lists the scheduling lines to reserve these cars, by date and schedule.

 

Lists:
'Carros - Apoio Administrativo' - All cars in the company, one per plate

'Reserva de Carros - Apoio Administrativo'.Placa - All schedules of car reservation.

 

What I have in common between the two lists is the plate that I managed to filter in the gallery with the following command:

 

Filter('Carros - Apoio Administrativo';
    Not(Placa exactin 'Reserva de Carros - Apoio Administrativo'.Placa)
)
 
That command result's to show only the car that is not on 'Reserva de Carros - Apoio Administrativo' list, but i need to filter the time together to not show the cars that have schedule for the date/hour to do a new schedule. on this second list i have two date/hour type column, the begin column and the end column of reservation.
 
I need to compare this two date/hour column with 2 variables date/hour that i have inside the power apps on this filter, to search only available cars on the date for reservation.
Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @thiago270,

    Do you mean you have two date and time columns in 'Carros - Apoio Administrativo'?

     

    To filter the available cars, you need to add the following condition:

    Filter('Carros - Apoio Administrativo';
     Not(Placa exactin 'Reserva de Carros - Apoio Administrativo'.Placa),
     ((StartDateTime <= sDate.SelectedDate + sTime.Selected.Value&& EndDateTime > sDate.SelectedDate + sTime.Selected.Value) || 
     (StartDateTime < eDate.SelectedDate + sTime.Selected.Value&& EndDateTime >= eDate.SelectedDate + sTime.Selected.Value) || 
     (StartDateTime < sDate.SelectedDate + sTime.Selected.Value&& EndDateTime > eDate.SelectedDate + sTime.Selected.Value))
    )

    Note that StartDateTime and EndDateTime are two date and time columns in 'Carros - Apoio Administrativo'.

    sDate.SelectedDate + sTime.Selected.Value and eDate.SelectedDate + sTime.Selected.Value  are two date time variables in my Power Apps.

     

  • thiago270 Profile Picture
    5 on at

    Sorry, but problably i didn't explain well what i need. Let me put some screenshots to show.

     

    thiago270_0-1713871694679.png

    This first list (Carros - Apoio Administrativo) is where i register my avaiable cars on the company, so here i have one car each and the column Placa is the unique id for each car. Placa in portuguese is the same of car plate in US English.

    ______________________________________________________

     

    thiago270_1-1713871847372.png

    On this Second list (Reserva de Carros - Apoio Administrativo) have the schedules of reservations.

    I can have a car with multiple reservations, but evertime with different dates/hours, not having conflict.

     

    On my powerapps app i have a screen for schedule a car for a trip. where the user need to choose first the day start and end of the trip and the hour that he will get the car and hour that he will give back the car for the company.

     

    This variables are named HourBegin and HourEnd.
    Example:

    thiago270_2-1713874238197.png

     

    i need that when a user choose the date and times of the trip on the app, on the gallery filter show only the cars that is avaiable, what means that the car don't have a schedule for date/time interval.

  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @thiago270 

     

    you can also try:

    Filter(
     'Carros - Apoio Administrativo',
     Not(
     Placa in Filter(
     'Reserva de Carros - Apoio Administrativo',
     (InicioReserva <= reservationEnd && FimReserva >= reservationStart)
     ).Placa
     )
    )
    

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard