cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nvargas
Microsoft
Microsoft

Checking two lists on SharePoint for date criteria

I have two lists on SharePoint:

  1. Blackout Dates
  2. Work Items

List Criteria:

  • The Blackout Dates list has a "Blackout Start" date column, a "Blackout End" date column, and a "Stage" column. (Approved, Pending, Rejected, Cancelled)
  • The Work Items list has an "Execution" date column and a "Blackout?" choice column (True/False).

 

I want to populate the "Blackout?" column with true if the Execution date falls within the Start and End dates of an approved Blackout (Stage = Approved).

 

Is there an easy way to do this?

1 REPLY 1
abm
Super User
Super User

Hi @nvargas 

 

First read the work items records. Add a loop to iterate all the records. Inside the loop Read the Blackout Dates list filtered by Execution Date >= Start Date and Execution Date <= End Date and Stage approved. If record count is one then update the list.

 

All date must be formatted to yyyy-MM-dd format using the expression. See below example.

 

use formatDateTime('DateColumn', 'yyyy-MM-dd')

 

How many records you having?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,499)