cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SpikeNZ
New Member

Moving folder based on time and date time coulmn

Hi Guys,

 

I'm new to Flow, this will be my first one.

 

How would I go about building a flow based on a date/time column on a folder in SharePoint.

 

It would work like this:

1. User manually puts a date into the coulmn on a folder for when a contract started.

2. The flow would run every day.

3. If the Flow detected the current date to be past 6 months of the column date entered, it would move the folder to an archived folder.

 

Screenshot_7.pngScreenshot_8.png

 

 

6 REPLIES 6
v-LilyW-msft
Microsoft
Microsoft

Hi @SpikeNZ 

According to your description, you want to move folder based on date time column.

I set up a single Flow you can refer to the screenshots as below:

This is my Folder

vLilyWmsft_0-1625646527135.png

Flow in details:

vLilyWmsft_1-1625646527140.png

Expression: empty(item()?['Datetime'])

vLilyWmsft_2-1625646527145.png

Expression: items('Apply_to_each')?['Datetime']

Expression: addDays(utcNow(),-182,'yyyy-MM-dd')

Expression: items('Apply_to_each')?['{Identifier}']

vLilyWmsft_3-1625646527157.png

Then save Flow and can test it.

After flow runs,the folder named ‘Folder to move’ will be moved to Archive

 

vLilyWmsft_4-1625646527159.png

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

SpikeNZ
New Member

@v-LilyW-msft 

 

Hi Lily,

 

Unfortunately no luck, have copied everything you have shown, maybe it is to do with the date. In our SharePoint, it is this format: m/d/y

 

Screenshot_15.pngScreenshot_14.png

v-LilyW-msft
Microsoft
Microsoft

Hi @SpikeNZ 

What is the data format of your 'Date time'?

Is it Date and time type?

 

vLilyWmsft_0-1625813993355.png

Best Regards

Hi Lily, please see the attached screenshot. Looks to be the same. BTW, thanks for the help with this.  Screenshot_16.png

v-LilyW-msft
Microsoft
Microsoft

Hi @SpikeNZ 

It seems there is no problem,I rebuilt one flow according to my solution and still works. 

What is the internal name of your Date time?Is it Datetime? You can check the internal name according to the following steps.

1.Click library setting

vLilyWmsft_1-1626053541875.png

2.Click Date time

vLilyWmsft_2-1626053571997.png

3.Than you can find the internal name.

vLilyWmsft_3-1626053601387.png

If the internal name is Datetime, I suggest you recheck the flow formula.

Best Regards

Hi Lily,

 

An update:

 

If I create a new test site the flow works.

 

If I try running it on the site that is not this test site, it does not work.

 

I have checked the permissions of both sites, I'm in the owner's group on both.

 

Not sure what permissions I may be missing here...

 

Sam.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,842)