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
over 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
over 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!
Saul Macht
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.
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!
Patricia Guevarra
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!