Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
1 like 0 dislike
15 views
ago in Power Automate by 14 18 27

I'm working on a Power Automate flow and need to remove all spaces from a string.

For example, converting "Hello World" to "HelloWorld".

What is the best way to achieve this in Power Automate? Can I use expressions or specific actions? I am looking for a solution that works efficiently for strings of varying lengths. 


1 Answer

1 like 0 dislike
ago by 48 55 94

Remove All Spaces from a String in Power Automate

In Power Automate, the best way to remove all spaces from a string is to use the replace() function.

replace(YourString, ' ', '')
  • ' ': This is the space character that you want to remove.
  • '': This is what you want to replace the spaces with, in this case, nothing (it will remove the spaces)

For more detail, you can check Remove All spaces from string in PowerAutomate

If you don’t ask, the answer is always NO!
...