cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Move file to a specific folder based on the answer in MS Forms

Hi Community,

 

I'm currently working on a workflow that allows the attached file in a MS Forms to be direct to different folders base on the multiple choice answer in the form. So basically I will need to use a dynamic content "Document Name" to identify file name and move the file.

 

However, one "really cool" feature of MS Forms is that it automatically adds submitter's name after the file name, so the file would actually get saved as something like "xxxx.pdf_Joe_Smith", which is different from the what the dynamic content identified.

 

I wonder if anyone can help me figure out:

1. How to stop MS Forms from adding submitter's name into the doc name

2. Any other approach to direct attachment based the answer in the form

 

Thank you very much!

 

Roger

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @TGRM 

 

Thanks a lot for the screen share. Following are the steps we did to achieve the solution.

 

1. Created source and target filename variables.

2. Use the Office365 connector to get the form submitters Display name

3. Construct the target filename. Here we used the replace expression to remove the Display name from the target filename.

4. Finally used the Create File connector to create the file to target destination.

 

Hope the session was useful. 

 

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

View solution in original post

11 REPLIES 11
Super User III
Super User III

Hi @TGRM 

 

This is by design and you won't be able to change the submitters name and filename format. Once the file is uploaded you can always rename or get the filename using other Power automate actions. Is anything particular you looking for?

 

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

Hi abm,

 

Thank you for the reply.

 

The purpose of this flow is to route the submitted files into specified folders based on the answer in the form (e.g. department), which triggers approval request to respective manager. So using this approach, I use a "Copy File" step in my flow, which uses the file name when submitter submits it, but since the file name changed after upload (adding the submitter's name), the flow will run into an error as the dynamic content will not be able to identify it.

 

Let me know if this is not clear.

 

Thank you!

Super User III
Super User III

Hi @TGRM 

 

Using the split expression you can get the filename

 

xxxx.pdf_Joe_Smith

 

First(Split('xxxx.pdf_Joe_Smith','.pdf')) will return xxxx

 

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

But I don't think there is any dynamic content that can capture the file name after adding the submitter part?

Following this approach, I believe we can only 1. stop MS Forms from making the the name change, or 2. route the file before its name got changed.

Or, Maybe we can jump out of this specific logic, is there way in general to route MS Forms attachment to different folder based on the question answer?

Capture.PNG

 

Super User III
Super User III

Hi @TGRM

 

Not sure I quite understood overall.

 

Why not rename the file after this process without the submitter name? 

 

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

In your split function the new file name is the input. But how do I capture the new name?

Super User III
Super User III

Hi @TGRM 

 

Before I give you the split answer are you saying the input is the Flow input parameter?

 

image.png

 

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

I wouldn't know the file name because people will be submitting all kinds of documents through MS Form, which is the trigger. I want the flow to capture their file name and direct the file to the folder where I as an reviewer can approve or reject. All these action I expect to be done automatically.

So, yes. I will not be manually tying any file name to trigger the split function, and I don't think we can embed a dynamic content into a function.

Super User III
Super User III

Hi @TGRM 

 

Thanks a lot for the screen share. Following are the steps we did to achieve the solution.

 

1. Created source and target filename variables.

2. Use the Office365 connector to get the form submitters Display name

3. Construct the target filename. Here we used the replace expression to remove the Display name from the target filename.

4. Finally used the Create File connector to create the file to target destination.

 

Hope the session was useful. 

 

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

View solution in original post

Frequent Visitor

This is still annoying to have submitter's name added to the upload documents. Especially when we try the approval workflows. Is there a way to keep the original upload document name.

 

Note: I have created a flow with multiple attachments and IT WORKS ALL GOOD!! Except adding form submitter's name to it. 

 

Any help from experts?????

 

@https://powerusers.microsoft.com/t5/General-Power-Automate/Avoid-adding-submitter-s-name-to-the-file...

Hi @Panneja 

 

Could you please submit another post? Current post is already marked as answered. Of course you can mention other links in your post.

 

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

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (3,028)