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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / check if dates in the ...
Power Apps
Answered

check if dates in the app overlap with dates in a list

(0) ShareShare
ReportReport
Posted on by 15

I am trying to make an app for lending products, in a list the date and time for lending and receiving back are stored. now I want to enter a check that checks whether the chosen date is not already planned in a previous order.

What I came up with to make this work is to create a hidden screen that does the check. in the hidden screen there is a gallery of all orders, if I check out for each gallery item whether this date overlaps with itself, and if so, does that gallery item pass its ID. by reading the ID again, it is immediately possible to indicate why the chosen date is unsuitable, because it then overlaps with ID.. with date...

This must be a cumbersome way, but I can't even get this to work, what formula should I use for the gallery items to do this check?
or is there a better, simpler or faster way to do this check?


example of the hidden screen:
App hulp.png

Categories:
I have the same question (0)
  • turnerj3 Profile Picture
    2,039 on at

    You could make the gallery items a filter of the list based on date.

    Filter(list, list date=datepicker date)

  • Niels_F Profile Picture
    15 on at

    I've come a long way by puzzling and trying. but now i run into a problem.

     

    I use a sharepoint list, The list contains a start and end date for each line. 

    the formula below indicates the days of the first match found in the calendar with a red color

     


    Fill:

    If(
     DateValue(Label5_25) + ThisItem.Value - 1 >= LookUp('Uitleen Beheer'; Titel = Text(Label5_34)).'Uitleen moment'&&
     DateValue(Label5_25) + ThisItem.Value - 1 <= LookUp('Uitleen Beheer'; Titel = Text(Label5_34)).'Retour moment';
     RGBA(255; 0; 0; 1);
     RGBA(0; 0; 0; 0)
    )



    Schermdatepicker.png 

    I would like to use my formula on every line of the sharepoint list. all start and end dates with the same barcode as the chosen barcode must turn red in the calendar.

     

    what formula do i need for this?

  • turnerj3 Profile Picture
    2,039 on at

    Are the lookups in your current If the barcode?

  • Niels_F Profile Picture
    15 on at

    Sorry for the confusion, the list is indeed also filtered by barcode. this is the Title in the sharepoint list.
    My formula filters on Title.

    So the formula works for one line, but I'm looking for a solution to color all dates from the sharepoint list with this barcode red in the app

  • Verified answer
    turnerj3 Profile Picture
    2,039 on at

    @Niels_F ,

    To simplify the task, why don't you add another square that you can fill to the calendar. Then add the code to fill based on barcode to that item. You should be able to then use a filter instead of lookup to get all records with that barcode. 

  • Niels_F Profile Picture
    15 on at

     

    Thanks for thinking along, I've solved it now.
    The calendar now shows the days that are already fixed for all products with the same barcode. This makes planning a new order a lot easier.
    i used this code on the first calendar day for the fill function:

     

     

     

    If(
     Not(IsEmpty(
     Filter(
     'Sharepoint list';
     DateValue('Loan Date') <= DateValue(SelectedDate.Text) + SelectedItem.Value - 1 &&
     DateValue('Return Date') >= DateValue(SelectedDate.Text) + SelectedItem.Value - 1 &&
     Title = Barcode.Text
     )
     ));
     RGBA(202; 202; 202; 1);
     RGBA(0; 0; 0; 0)
    )

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard