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
17 views
ago in Power Automate by 14 19 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

2 like 0 dislike
ago by 49 55 96
selected ago 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

ago by 14 19 27
0 0
Thanks Heba, it helped me!
ago by 49 55 96
0 0
You're welcome!
If you don’t ask, the answer is always NO!
...