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

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

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 @nnkaya 

 

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

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

It is: Choice

 

DataType.png

 

How do I convert?

Hi @nnkaya 

 

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

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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,659)