cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Move files after X days

I am trying to setup a flow to move old items on a schedule and getting a couple of errors.

 

This is the current flow: 

 

schedule1.JPG

 

First issue: I am struggling to get the MODIFIED or CREATED date format working, I'm assuming that it should be something like this:

 

Greater or Equal than: addDays(formatDateTime(utcNow(), 'YYYY-MM-DDThh:mm:ssZ'), -7)

 

 

I have manged to get it working without it scanning the correct date and time and then I hit the second error message which happens in the MOVE FILES stage

 

The get files and get team flows point to the same team site and I am attempting to move files from one folder to another on here.

 

e.g. https://mysite.sharepoint.com/submittedfiles to https://mysite.sharepoint.com/completedfiles

 

Flow fails with below error. 

 

{

"status": 400,
"message": "Missing or mismatched field definition on the destination list for source field 'Approved_x003f_' type 'Choice'. Source site template id 'GroupWebTemplateID', target site template id 'GroupWebTemplateID'. Total blocked root objects in this operation is [1].\r\nclientRequestId: 6232cf17-4e30-45f6-849e-c1614caea8c8\r\nserviceRequestId: 6232cf17-4e30-45f6-849e-c1614caea8c8"
}

schedule2.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Move files after X days

Hi @MD7648,

 

Issue 1: Please use the following expression instead of YYYY-MM-DD.

addDays(formatDateTime(utcNow(), 'yyyy-MM-ddThh:mm:ssZ'), -7)

 

Issue 2: 

field 'Approved_x003f_' type 'Choice'.

The destination list has no column named "Approvaed?", you should make sure the columns in the two lists are all same, the move files could work.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Move files after X days

Hi @MD7648,

 

Issue 1: Please use the following expression instead of YYYY-MM-DD.

addDays(formatDateTime(utcNow(), 'yyyy-MM-ddThh:mm:ssZ'), -7)

 

Issue 2: 

field 'Approved_x003f_' type 'Choice'.

The destination list has no column named "Approvaed?", you should make sure the columns in the two lists are all same, the move files could work.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Highlighted
Helper I
Helper I

Re: Move files after X days

Thanks that looks like its sorted it, I've gone for formatDateTime(utcNow(), 'yyyy-mm-ddThh:mm:ssZ' on a 7 day schedule to check for items older than current time with content approval status = approved. 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,310)