cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Flow to auto-generate new folder after user form filled

Hello,

 

I am trying to create a workflow and am not even sure where to start. I tried looking through the templates for something similar but here is my flow

 

User fills form>Create a new folder based on a choice from the form>Generate the folder name to start at 01

 

So the next time someone fills the form, the new folder name would be 02

10 REPLIES 10
Highlighted
Super User II
Super User II

Re: Flow to auto-generate new folder after user form filled

@Anonymous 

Hi there.  So a couple of things:  

  1. How well this will work will depend on where the files are stored (SharePoint, OneDrive, OneDrive for Biz, etc...)
  2. I'd really like to poke at why we want folders.  No need to justify if it's a firm part of the scope, but I'd like to submit that it might be more effective to store everything in a single location and key the metadata to make it 'findable' by whatever process is downstream.
  3. If we're still on the folders, then we'll probably need to store the last numeric value someplace.

 

Keep us posted.

-Ed-

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

 

Highlighted
Anonymous
Not applicable

Re: Flow to auto-generate new folder after user form filled

Hey Ed,

 

These folders would be saved in SharePoint and the reason for the different folders is because of all the different projects we have and all the documents we want to save related the projects would go there.

 

Thanks, Jay

Highlighted
Super User II
Super User II

Re: Flow to auto-generate new folder after user form filled

@Anonymous 

Got it.  It helps to understand the whole process sometimes in case a little flexibility could save a bunch of work.

 

Ok, so I'm going to also bring in @AKRogers since she's super awesome at SP.  But I'm thinking it will just be a matter of storing the last number used in a SP List somewhere, then calling that and updating it with your flow as new folders are added.

 

-Ed-

Highlighted
Anonymous
Not applicable

Re: Flow to auto-generate new folder after user form filled

Thanks for the help, Ed 

Highlighted
Helper V
Helper V

Re: Flow to auto-generate new folder after user form filled

Hi @Anonymous,

 

@edgonzales was definitely on the right track when asking about the need for folders!  Will you ever reach a maximum number, or will each type of project folder (i.e. "02 Customer Documents") just always continue to increment?  

 

Assuming you just need to increment the integer on the folder name we'll need to do two things inside the flow to keep the "latest" number up to date:

 

  1. Create a column in your library called "Folder Number" that gets created with the same number as the Folder title.  So, if your folder is called "02 Customer Documents," the Folder Number column will be the number 2.  A folder called "03 Customer Documents" has a Folder Number value of 3.  Note: to actually set and store metadata on a folder you'll need to create a new Content Type from the base Folder content type in your site collection.  
  2. When creating new folders you'll first need a SharePoint Get Items action with the orderby section filled in.  Using this with the Folder Number column you will create, you'll be able to locate the last number used in the library and increment that number for use in your new folder title.  It would look something like this:

 

FolderIncrement_122319.png

 

 

One final suggestion is to create one library per Project Type so that your metadata is consistent and so that users understand what they are getting when they go to a particular library.  This way you also don't have to juggle "02 Customer Documents" and "02 Field Surveys" in the same library.

 

Let me know how it goes!

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
Community Support
Community Support

Re: Flow to auto-generate new folder after user form filled

Hi @Anonymous ,

 

Please take a try with @AKRogers 's solution and please feel free to ask here if you have any questions.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Anonymous
Not applicable

Re: Flow to auto-generate new folder after user form filled

Hey @AKRogers,

 

Sorry, I was on holidays but I will give this a try and let you know how it goes.

 

Thanks, Jay

Highlighted
Anonymous
Not applicable

Re: Flow to auto-generate new folder after user form filled

Hey, @AKRogers,

 

I created a new library and added a column but it does not show the value. 

 
 
 

2020-01-06 10_02_54-Window.png

Column Settings

 

2020-01-06 10_02_22-Window.png

Library

Highlighted
Helper V
Helper V

Re: Flow to auto-generate new folder after user form filled

@Anonymous, 

 

I think we might need to step back and break this down a bit!  You did not need to create a new library with new columns right off the bat; that was a suggestion to help keep things straightened out down the line.

 

If you were able to follow my suggestions from the other day, can you please post the new version of your flow so that we can see where you're trying to implement the new steps?  If you're still feeling a bit unsure, let me know and maybe what we need to do is break it out step by step.

 

Thanks!

Ashley

Highlighted
Anonymous
Not applicable

Re: Flow to auto-generate new folder after user form filled

Hey @AKRogers,

 

Sounds good, I will explain why this flow is needed and what I am planning to use it for. I work in an engineering department and we get assigned new projects or come up with new projects and we have a user form that has to be filled out whenever someone is assigned a project. The user form consists of the date it was assigned, which division does it fall under a brief description of the project

 

We have 7 different divisions, so if the user submits the new project form that falls under division 1 it would be named MFG.020.001 and if it falls under division 3 it would be named MFG.002.020 but into a different folder. So the three middle numbers would keep going up in count regardless of what division it falls under.

 

The middle 3 values are the year the project was submitted, so if it was submitted last year it would be MFG.019.001 and if it was submitted this year it would be MFG.020.001. So the counter would have to be different every year.

 

So this would be the flow:

 

The user submits the form choosing division the project is ->Create a new folder named MFG.001.020 and the middle 3 values would increase in the count after another project is submitted regardless of what division it falls under. The new folder would also be created under the chosen division.

 

Thanks, Jay 

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.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,255)