09-11-2025 09:33 AM
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....
09-11-2025 09:38 AM
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
endCurious if anyone else has another solution though!
09-11-2025 10:30 AM - edited 09-11-2025 10:31 AM
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.
09-11-2025 11:56 AM
Hi @spencerstone
I think you can try this way
09-12-2025 09:23 PM - edited 09-12-2025 09:37 PM
Hi @spencerstone ,
Here is detailed solution to the asked requirements.
Example