web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Removing trailing spac...
Power Automate
Answered

Removing trailing spaces (Trim?) from dynamic content

(0) ShareShare
ReportReport
Posted on by

Hey all,   

 

I am using Power Automate to take a request from a SharePoint list I have created (using it as a request form) and I have flows in place to create a file folder in a document library based on the information provided in the list. In this scenario, the 'Topic' entered into the list is what I want to be the name of the folder it creates for me. 

I recently ran into a problem with the flow, however, relating to file folder names cannot end with a space, which is easy to accidentally do. 

 

I need a way to take my 'Topic' input from the list, trim the whitespace/extra spaces from the end of the string and pass that over to the 'Create a Folder' action, to ensure the action doesn't fail due to invalid filename/syntax. I'm sure there's a way to code it, I just can't figure it out.  (I've been using Power Animate for a week, not much coding experience)

 

Appreciative of any thoughts/ideas!  Image below for reference in case my description doesn't make sense.   

 

Flow post pic.png

 

Categories:
I have the same question (0)
  • Verified answer
    efialttes Profile Picture
    14,756 on at
    Hi
    You can do it by defining an expression
    https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/

    There is a WDL function called 'trim'
    https://docs.microsoft.com/bs-latn-ba/azure/logic-apps/workflow-definition-language-functions-reference#trim
    Hope this helps
  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    Hi @tbergmann ,

     

    As @efialttes  suggested, you could refer to this configuration:

    161.PNG

     

    Best Regards,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard