web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Automatically move to ...
Power Automate
Answered

Automatically move to Folder/Condition

(0) ShareShare
ReportReport
Posted on by

Hello,

 

im currently trying to sort documents of a library into subfolders using a field with a Date, the sub folders should then be : year/month/document

 

I found a similiar request and got it to work (kinda)

https://powerusers.microsoft.com/t5/Building-Flows/Sharepoint-move-files-and-create-a-folder-based-on-month/td-p/99881

 

The Problem is I have Documents that do not have a Date or other informations assigned yet and only want files to be moved if all fields are set, so I tried building a condition that checks if the fields are null, this also seems to work.

 

BUT as soon as I run the flow with at least one Document that has all fields set the flow will copy all files even if all fields are blank but the Date is set.

 

It seems like the apply to each uses all files previously saved and if one of them gets through the condition all of them get proccessed like they also got a true in the condition.

 

I tried to set the condition after the get files properties but it always creates a new "Apply to each"

 

 
 

image.pngimage.pngimage.png

 

Categories:
I have the same question (0)
  • JohnAageAnderse Profile Picture
    1,986 on at

    Hello @Landline 

    In your condition, under the If Yes branch, you do not need the Apply to each action as at that point you are working with a single document!

    Kind regards, John

  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @Landline,

     

    If these items are string format, you could use the length() function to get length of the value, then judge them whether is not equals to 0:Annotation 2020-04-10 152729.png

     

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard