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
106 views
in Power Automate by 15 23 31

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

2 like 0 dislike
by 49 56 107
selected by
 
Best answer

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

by 15 23 31
0 0
Thanks Heba, it helped me!
by 49 56 107
0 0
You're welcome!
If you don’t ask, the answer is always NO!
...