cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Moving files from one SharePoint library to another document library by year

Hello All,

 

I have a Power Automate flow that should moves files from one SharePoint document library to another SharePoint document library automatically based on years.


Year is a chose column in SharePoint which has : 2018, 2019, 2020, 2021 values.

 

I set up the flow to send all files from one SharePoint document library to another document library apart from 2021 files.

(Keeps all 2021 files and move all other years files to a new location).

 

Unfortunately it is NOT working. I would appreciate if you could help please.

SharePoint.png

 

PowerAutomate-1.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

The solution is this:  

Adding this (Year ne '2021') into the "Filter Query" filed.  Please see the attached screenshot.

 

DataType-1.png

View solution in original post

7 REPLIES 7
abm
Super User
Super User

Hi @Anonymous 

 

What error are you getting?

 

Have a look at my video tutorial about moving files.

 

https://www.youtube.com/watch?v=B9ZxAd9JVVo&t=542s

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

It sends all files despite there is filtering value sets: Year value is NOT equal to 2021.

 

In reality, it should NOT send the files that are tagged to 2021.

What is the data type of Year Value column? Could you try converting to string() or int() accordingly for the comparison.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

It is: Choice

 

DataType.png

 

How do I convert?

Hi @Anonymous 

 

Looks like thats the choice column. Have a look at my video about how to filter SharePoint Choice column data types?

 

https://www.youtube.com/watch?v=N20Y-ZNRKhk&t=7s

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

The solution is this:  

Adding this (Year ne '2021') into the "Filter Query" filed.  Please see the attached screenshot.

 

DataType-1.png

That IF condition is not evaluating due to datatype. So if you convert to int() it should work as expected I think. Glad to hear that you found a solution.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,625)