cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Danielamgzz
Regular Visitor

Open and Close Active/Inactive Week

Hello!

I have a list on Share point and I have this fields : 

  • Year
  • Month
  • Week
  • Status

I need to build a flow for update the field Status to Active or Inactive according to the week in which we are, I would like to build a scheduled cloud flow and run it once a week

Could you help me?, I am new in power automate and I don't know how I could structure the flow 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Danielamgzz,

 

Probably the easiest approach would be to add that from and to date to the list as well. Would that be possible in your situation?

 

weekslist.png

 

When you have those two columns in your list you can schedule the flow every Monday and filter the items with from date equals today with an utcNow function.

 

Below is an example of that approach.

 

1. The Get Items will retrieve the current week.

 

2. In the apply to each it will update the items which are retrieved in the get items (which should only be 1) and the status is updated to active.

scheduleflowweek.png

View solution in original post

6 REPLIES 6
Expiscornovus
Super User
Super User

Hi @Danielamgzz,

 

What type of data will the week column have? Will it be week numbers, first day of the week or something else?

Hello @Expiscornovus 
It is Week numbers 

Expiscornovus
Super User
Super User

Hi @Danielamgzz,

 

Thanks for your reply.

 

Not everywhere in the world week numbers are the same and also it start day can be different (sunday vs monday). What format are you using? 😁

52  weeks 

Starts on Monday

044D5E0D-5D20-4880-B6E9-CB76019DDB95.jpeg

Expiscornovus
Super User
Super User

Hi @Danielamgzz,

 

Probably the easiest approach would be to add that from and to date to the list as well. Would that be possible in your situation?

 

weekslist.png

 

When you have those two columns in your list you can schedule the flow every Monday and filter the items with from date equals today with an utcNow function.

 

Below is an example of that approach.

 

1. The Get Items will retrieve the current week.

 

2. In the apply to each it will update the items which are retrieved in the get items (which should only be 1) and the status is updated to active.

scheduleflowweek.png

View solution in original post

Danielamgzz
Regular Visitor

Thank you!, the flow runs perfectly!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,150)