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.

Highlighted
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

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

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

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!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,351)