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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,950)