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

Move document if date column is less or equal to today's date. New to flow and need help PLEASE.

I am completely new to Flow and I am not a Technology major by any means so I am asking for step by step instructions in laymans terms if anyone can help please.

I am trying to build a flow so that documents that are equal to or older than 120 days from today will be moved from one document library titled Procedural Update (the Column name with the date + 120 is named MoveDocument), to a document library titled Archive.

I started with Recurrence and Get Files (Properties Only) and that is where I continually have an error (400).  I have tried MoveDocument eg utcNow('MM/dd/yyyy') and multiple other ways. 

Can anyone please help?

1 ACCEPTED SOLUTION

Accepted Solutions
Tbruns
Level: Powered On

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

Spoke with Microsoft and they figured it out for me. Here is the flow.

11-26-2018 10-23-39 AM.jpg

 

addDays Condition (replace -180 with how many days you want:

addDays(utcNow(), -180, 'yyyy-MM-dd')
 
11-26-2018 10-23-21 AM.jpg

 

11 REPLIES 11
Community Support Team
Community Support Team

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

Hi @Tbruns,

 

I did a test on my side, and the Move file action does have some errors.

You could consider using the "Get file content-Create file-Delete file" process to achieve your requirements.

Configure Recurrence as a trigger to set a time to trigger Flow at the time each day.

Use Get files (properties only) to configure Filter Query to get only the properties of the file that needs to be moved.

54.PNG

56.PNG

Finally, use the steps "Get file content-Create file-Delete file" to complete the subsequent configuration.

Image reference:

55.PNG

Note: Please create a new library to test, do a backup job, prevent accidental deletion of files.

Please take a try and let me know if you have any issue.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Tbruns
Level: Powered On

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

received an error but trying again

Tbruns
Level: Powered On

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

Sorry I am still getting an error (below). I am very new to Flow so I am not sure if I am entering something incorrectly. My column that has the date is titled "Move"

10-23-2018 11-28-41 AM.jpg10-23-2018 11-29-39 AM.jpg

Community Support Team
Community Support Team

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

Hi @Tbruns,

 

You need to put the full single quotes outside the Expression, I noticed that your single quotes are incomplete.

You can type "Move le ‘’" first, then place the cursor inside single quotes, then edit expression, then click ok:

25.PNG

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Tbruns
Level: Powered On

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

I tried putting the single quotation marks around the expression and that did not work.

Tbruns
Level: Powered On

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

10-30-2018 7-08-54 AM.jpgWhen trying to add the filter it tells me there is no Dynamic Content.

 

Community Support Team
Community Support Team

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

Hi @Tbruns,

 

First of all, I don't know what is configured on your action, but your requirements here don't have to use Dynamic content, because you could use Column name and utcNow() to compare, just type in the expression.

23.PNG

Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Tbruns
Level: Powered On

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

So I have figured out how to move documents by using a Yes/No column however I am still needing a step to compare two date columns and if they equal put a "Yes" in the Yes/No column.

 

Dates are formated as MM/dd/yy.

So Column 1 is a Date/Time column (Date Only) titled "Today" which contains today's date.

Column 2 is a Calculated Column (=[Date Created]+[Add Days]), (Date Only) titled "Move" 

Column 3 is a Yes/No column where I am needing to enter "Yes" when Column 1 and Column 2 are equal to the same date.

 

Is this possible?

Super User
Super User

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

I think that you are going dor the wrong approach.

Why not trigger on file creation and then do a wait until and then move the document.

I wrote a post about this a few weeks ago


https://veenstra.me.uk/2018/10/23/microsoft-flow-sending-out-reminders/
Tbruns
Level: Powered On

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

This flow would not run for documents that have been created prior to creating the Flow correct? If so that will not work for us.

Tbruns
Level: Powered On

Re: Move document if date column is less or equal to today's date. New to flow and need help PLEASE

Spoke with Microsoft and they figured it out for me. Here is the flow.

11-26-2018 10-23-39 AM.jpg

 

addDays Condition (replace -180 with how many days you want:

addDays(utcNow(), -180, 'yyyy-MM-dd')
 
11-26-2018 10-23-21 AM.jpg

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow 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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 358 members 5,066 guests
Please welcome our newest community members: