Question
Replace State abbreviation with full State name in email
Hi All,
Can you help me figure out the best way to create dynamic text for an email? Here's what I would like the email to look like:
"Hello {FirstName}
You can be the first {anesthesiologist/urologist} in {California/New York/Texas} to have this."
Problem is, instead of the full State names we use a field with the two letter abbreviation: CA, NY, TX, etc. Also, the entries in our custom specialty field are "Anesthesia" or "Urology" instead of "anesthesiologist" and "urologist."
I think creating additional custom fields with the spelled out State name and differently worded medical specialties would be easiest, but I'm worried I'll end up with a bunch of rarely used fields if I do this every time I run into this situation.
Snippets seem to be designed for customizing entire blocks of text, not so good at customizing a single word here and there.
Should I be looking at tokens and Velocity instead? Something like "if lead_State = CA, return California?" If so, does anyone have an example of such code that they could share?
Thanks
Can you help me figure out the best way to create dynamic text for an email? Here's what I would like the email to look like:
"Hello {FirstName}
You can be the first {anesthesiologist/urologist} in {California/New York/Texas} to have this."
Problem is, instead of the full State names we use a field with the two letter abbreviation: CA, NY, TX, etc. Also, the entries in our custom specialty field are "Anesthesia" or "Urology" instead of "anesthesiologist" and "urologist."
I think creating additional custom fields with the spelled out State name and differently worded medical specialties would be easiest, but I'm worried I'll end up with a bunch of rarely used fields if I do this every time I run into this situation.
Snippets seem to be designed for customizing entire blocks of text, not so good at customizing a single word here and there.
Should I be looking at tokens and Velocity instead? Something like "if lead_State = CA, return California?" If so, does anyone have an example of such code that they could share?
Thanks