cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlexandruCazan
Level: Powered On

Updating file properties + loop

What flow can i build that will update file properties to add 365 days to a certain Date and Time column? I could use "when an item is created or modified" but i only want to add the 365 days when the file has been modified by manager, not to any file that is created.

I did try with the "when an item is created or modified" -> "update file properties" but it also bugs as it creates a loop.

Or, even better, can I somehow create a button in the web part that triggers the updating flow?

Thank you

 

3 REPLIES 3
v-zhos-msft
Level 10

Re: Updating file properties + loop

Hi @AlexandruCazan ,

I suggest you use the 'For a selected file' trigger of you flow.

Capture1.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AlexandruCazan
Level: Powered On

Re: Updating file properties + loop

Thats a good suggestion. It fits my needs, but can you help me with the addDays function?

I want to add 365 days everytime i run the flow, but it gets stucked at 2020, it doesn't matter if i have the review date to 2019 or 2009, if i run the flow, it modifies the date to 2020, so i think the 'utcNow' timestamp is the problem.

c1.PNG

Highlighted
v-zhos-msft
Level 10

Re: Updating file properties + loop

Hi @AlexandruCazan ,

The 'utcNow' function is to return the date of now time.

The year is 2019 now, so after add 365 days, it will always return 2020.

For more information about 'Date and time functions', please take a reference:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#d...

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,167)