cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Flow to move folders and hide list item

Hello

 

I'm new to SharePoint/Flow/Workflow on SharePoint Designer and have inherited a small sub site which already has workflows setup in designer 2013. We have a project register list/form that when a new item is added to the list a unique Quote reference number is created and a corresponding project folder is created. I want to create a new flow that when the Status column of the Projects list changes to Completed the corresponding project folder (created when the new item is added to the list) is moved into a folder called Archive in the same directory and the list item is hidden from view. I've created the basic flow but am not sure how to make it move the correct folder or hide the list item. Can some please help and advise of the best way to do it?

 

flow sni_LI.jpg

 

5 REPLIES 5
Highlighted
Helper V
Helper V

Hi @Nick_k, and welcome!

 

I see that your Flow trigger is "when an item is created or modified," so to make sure that you only move folders with a Status of "Completed," you'll want to add in a couple of things.

 

First, I suggest adding a "Flag" to your items so that you know what you have already run this Flow on.  This would be a yes/no column hidden from general users.

 

Second, I would add a SharePoint Get Items action with a filter query to look for items where the status is Completed.  This is necessary since the Flow will trigger on every create/modify.  (Note: you can also add a condition to your trigger, but Get items  keeps it simple for now.)

 

From here you have a couple of choices, and that depends on whether your Project Folders have a title that matches the Completed project item.  If so, you can make sure you're getting the right folder each time by comparing the folder Name against the List item.

 

Finally, add the Update Item action to update a property on the initial list item to hide it from a SharePoint view.

 

Here's what this might look like from a very high level:

6.png

 

And a closer look at using the Filter Query in the Get Items action:

7.png

 

 

Good Luck! Feel free to reach out again if you have more questions.

 

Ashley

 

If this response provided an answer to your question please mark it as a solution so that others can find it.

If you found this helpful, consider giving it a thumbs up!

Highlighted

Thanks for your response Ashley! 

Sorry, i'm quite a novice. Is the 'initialize variable' the step that would i dentify the corresponding folder to list entry? (so the correct folder is moved?

Highlighted

Ashley - do you think 'when an item is created or modified' is the best place to start this flow?

Highlighted

Hi again!

No worries! Yes, Initialize Variable would be the action where you add in the “Title” of the Item that has changed. You’ll see it in the Dynamic Content window when you go to set the value of Initialize Variable.
Regarding the right start (trigger) for your Flow, I don’t love using “when an item is created or modified” simply because the Flow fires every time a change is made for any reason in the list. I prefer to schedule these types of things using a Recurrence trigger.
However, it depends on your use case! You might need completed projects to be hidden immediately rather than on a scheduled basis. In that case you’ve started with the right trigger.

I hope that helps!

Ashley
Highlighted

Hi Ashley

 

Sorry i had to put this task on hold and i'm only just revisiting it now. I inherited SharePoint/Flow and PowerBI at work and have little experience with all...

 

Can you show me a expanded look at your 'move folder' item and how you specify it to move the correct/corresponding folder to the list item? Thanks

 

Regards

Nick

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (12,114)