Thursday
Right now, I receive First and Last name in an Integration in the following formats:
I use the .titleize function to correct the first 2 cases and it works a charm. For case 3, 90% of the time it works well, but there is the occasional case that Workato messes up with this formula.
Take for example someone with the name Daniel-Spaniel McBride. That is already titlecase, so I would want Workato to leave this alone. However, instead of recognizing a correctly titlecase name, it turns it into this: "Daniel Spaniel Mc Bride"
How can I prevent Workato from adding spaces where there should be special characters and messing up people's correctly formatted names, and also maintaining the CAPS -> Titlecase and lowercase -> Titlecase cadence? I want to use REGEX but I am not sure how to incorporate that into a Variable easily....
Thursday
I actually think I solved my own issue.... I used ruby in the formula
if input.match?(/\A[A-Z\s\-']+\z/) || input.match?(/\A[a-z\s\-']+\z/)
input.titleize
else
input
end
Curious if anyone else has another solution though!
Thursday - last edited Thursday
Hi @spencerstone,
Please check this formula with Regex expression, it may works for you... namePILL.match?(/^[a-z\s]+$/) || namePILL.match?(/^[A-Z\s]+$/) ? namePILL.titleize : namePILL
for me it worked well, when I checked in recipe, with different name and also I have tried with the name given by you, getting same name without any change.
Thursday
Hi @spencerstone
I think you can try this way
Friday - last edited Friday
Hi @spencerstone ,
Here is detailed solution to the asked requirements.
Example