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 / how to prevent MS form...
Power Automate
Suggested Answer

how to prevent MS forms upload file name changed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Expert,

 

when I upload file via MS forms, I can see submitter name is automatically added to end of file name, but I also can see that file name is truncated to make it shorter. 

 

I can remove submitter name via expression but I have no idea how to keep original file name. because in response detail from ms forms, file name is already changed. so no idea to get original file name from uploaded file. we have important information in file name so it needs to be kept. 

 

maybe, I can add to input file name in ms forms, but I have no idea when multiple file are being uploaded. 

 

Thanks in advances. 

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,931 Super User 2026 Season 1 on at

    Hi @Anonymous ,

     

    The responder's AD account display name seems to get appended to the filename and then saved to the form owner's OneDrive:

     

    Snag_244a2f1.png

    I'm not aware of a way to find or preserve the original file name other than removing the responders name from the filename using an expression. One example of such an expression could be:

     

    concat(slice(variables('varFileName'),0,lastIndexOf(variables('varFileName'),'_')),'.',Last(split(variables('varFileName'),'.')))

     

    For suggestions on how you may want to manage multiple file uploads, see:

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi ekarim2020, thanks for reply.

     

    I don't have issue with removing name of responders. problem is not only adding responder name file, ms form make file name short. i guess if more than 40 character, it makes less 40 character, that's problem.  

  • RobElliott Profile Picture
    10,416 Super User 2026 Season 1 on at

    The submitter's name is added and, if necessary, the filename shortened as part of the submission process. There's no way to change that behaviour as @ekarim2020 said.

  • Suggested answer
    Uladzislau Mironau Profile Picture
    4 on at
    Hi
    I faced the same issue and found a solution to the problem. 
    First what you need is a step - 'Get User Profile', with input of form submitters email. 


    I prefer to use function 'Replace' for this purposes
     
    DISCLAIMER: MS Forms have a hidden rule if submitter Name+Surname length exceed 20 symbols it is cut to be 20 symbols. 
    Example: Your submitter name and surname is Rosie Huntington-Whiteley (Jason Statham spoose) whose name length is 25 symbols, if she attach something in the form  the file with be not "*original filename*_Rosie Huntington-Whiteley.ext", no it will be "*original filename*_Rosie Huntington-Whi.ext"
     
    So for 'replace' to know what should be erased lets configure compose that will form added user name and surname:
     


     
    The code is as follows: 
    if(
    greaterOrEquals(
    length(
    concat('_',outputs('Get_user_profile_(V2)')?['body/givenName'],' ',outputs('Get_user_profile_(V2)')?['body/surname'])
    )
    ,int(22)),
    substring(
    concat('_',outputs('Get_user_profile_(V2)')?['body/givenName'],' ',outputs('Get_user_profile_(V2)')?['body/surname'])
    ,0,21),
    concat('_',outputs('Get_user_profile_(V2)')?['body/givenName'],' ',outputs('Get_user_profile_(V2)')?['body/surname']))
    this compose formula will generate dynamic content that you can then replace in any forthcoming actions in format:
    "_NAME SURNAME" even the cut version of it.
     
    in next steps upon adding attachments to SP lists, creating files on SP folder or any other action in file name you enter the following formula:
     
     
    replace(item()?['name'],*compose name from prev step*,'')
     
    This should remove Submitters Name and Surname in 100% of cases without changing your filename in any case. 
     
    let me know if you found this helpful.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 67

#2
David_MA Profile Picture

David_MA 64 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 39 Most Valuable Professional

Last 30 days Overall leaderboard