Last active
January 20, 2023 19:34
-
-
Save Beninetti/31d04100107d7e8fffe5a99ccca19282 to your computer and use it in GitHub Desktop.
A formula written to create an email ready string based on the special character formatted values from separate first and last name fields.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF( | |
AND( | |
{first_name}, | |
{last_name} | |
), | |
IF( | |
REGEX_MATCH( | |
TRIM({first_name}) & TRIM({last_name}), | |
"[áàâåæçèéëêîïìñôöòøõùûüýíúşó]" | |
), | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
REGEX_REPLACE( | |
TRIM(LOWER({first_name} & "." & {last_name})), | |
"ó", "o" | |
), | |
"ş", "s" | |
), | |
"ú", "u" | |
), | |
"í", "i" | |
), | |
"ý", "y" | |
), | |
"[ùûü]", "u" | |
), | |
"[ôöòøõ]", "o" | |
), | |
"ñ", "n" | |
), | |
"[îïì]", "i" | |
), | |
"[èéëê]", "e" | |
), | |
"ç", "c" | |
), | |
"æ", "ae" | |
), | |
"[áàâå]", "a" | |
), | |
TRIM(LOWER({first_name} & "." & {last_name})) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment