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 / How to check a list of...
Power Apps
Unanswered

How to check a list of dates in a collection against a sharepoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to Check selected dates in the PowerApps against a list of dates in a SharePoint list. Below is what I am trying to do.

 

I have 2 date pickers (start date and end date). 

 

For example, I selected start date as 01/09/2021 and end date as 03/09/2021.

 

In share point list i have 2 column which i need to check (i.e. From and To).

 

I want to loop through these 3 dates and check if any of these dates exists in my Scheduler list. Right now, I am creating a collection on OnChange property of end date picker but i am not getting desire my output.

 

//

 

ClearCollect(
colCheckDates,
Filter(
Scheduler ,
RequesterEmail = User().Email &&
To >= DataCardValue15.SelectedDate
)
);

 

I have gone through this thread but i am confused for some reasons.

 

 

Any help would be appreciated. 

 

Thanks

Ahmad

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I did not encounter this.

    Please check the following:

    • Is your Sharepoint set the correct time zone?
    • Whether there are items that match user.email in the RequesterEmail column?
    • Does the Date column contain time?

     

    Best Regards,

    Wearsky

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the response.

     

    Here is what want below:

     

    RequesterEmailFromTo
    test1@outlook.com09/02/202109/03/2021
    test1@outlook.com09/06/202109/06/2021
    test1@outlook.com09/07/202109/09/2021
    test2@outlook.com09/07/202109/07/2021

     

    If  test1@outlook.com select any start and end date from date picker in power apps and if it lies "between" or "equals" to From and To in share point list then condition should be true other wise false.

     

    • Does the Date column contain time?  Ans: No
    • Is your Sharepoint set the correct time zone? Ans: both Power apps and Sharepoint configured in local time zone.
    • Whether there are items that match user.email in the RequesterEmail column? Ans: I am required to compare with email because there will be multiple different email record exist in SP list.

    I would be happy if I get any possible solution.

     

    Regards

    Ahmad

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    You could try lower() function.

    ClearCollect(
    colCheckDates,
    Filter(
    Scheduler ,
    Lower(RequesterEmail) = Lower(User().Email),
    To >= DataCardValue15.SelectedDate,
    From<= Your datepicker control 's name.SelectedDate
    )
    );

     

    Best Regards,

    Wearsky

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard