Skip to main content
Community site session details

Community site session details

Session Id : He/hAbQ/l5396pF2M3ELxs
Power Automate - Building Flows
Answered

Removing trailing spaces (Trim?) from dynamic content

Like (0) ShareShare
ReportReport
Posted on 13 Dec 2019 04:08:27 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

 

  • Verified answer
    v-bacao-msft Profile Picture
    on 13 Dec 2019 at 06:45:45
    Re: Removing trailing spaces (Trim?) from dynamic content

     

    Hi @tbergmann ,

     

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

    161.PNG

     

    Best Regards,

  • Verified answer
    efialttes Profile Picture
    14,756 on 13 Dec 2019 at 04:41:40
    Re: Removing trailing spaces (Trim?) from dynamic content
    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

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete