• 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 almost 6 years ago
Answered

Using Split join

I need help with a Split Join. I'm trying to parse a field that has a value like this: aa-bb-cc. I'd like to Split it at the "-" and then Join the 2nd part to the 1st part, so I end up with bbaa.


Should the formula be: .split("-")[2,1].join ?

Best Answer
P
Patricia Guevarra said almost 6 years ago

Hi Saul,


You can try using this formula instead:


<pill>.split("-")[1] + <pill>.split("-")[0]


Basically, what you're doing is telling the recipe to split and take the second value (index 1), and then join it with the first element (index 0) of the same pill which is split as well. I hope this works for you!

Answer

Patricia Guevarra

said almost 6 years ago

Hi Saul,


You can try using this formula instead:


<pill>.split("-")[1] + <pill>.split("-")[0]


Basically, what you're doing is telling the recipe to split and take the second value (index 1), and then join it with the first element (index 0) of the same pill which is split as well. I hope this works for you!

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