• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Formula Mode Questions
S

Saul Macht

started a topic over 4 years ago

Remove empty lines in data

I have many blank lines that show up in some text output. It is not a problem, but if I could find a way to clean some of the whitespace that would look much better. Any tips?

L

Lee Meng Ran

said over 4 years ago

We can remove empty lines by appending a formula at the back of the datapill


[Datapill].gsub(/\n+/, "\n").strip


gsub is a formula that replaces a specific character in a string with another one.

strip removes leading and trailing white space in a string.


Documentation on workato formulae can be found here: 

https://support.workato.com/support/solutions/articles/1000173152-formula-mode-list-of-common-formulas-operators-and-how-to-use-them


\n+ and \n are regex expressions

Search for regex expressions here: https://regexr.com/

Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count