Create abbreviation

In one field I have a first & last name. I would like to take the first two letters of each to populate a second field. Eg. "Tabatha Fisher" -> "TaFi". I can manage the first half, but cannot seem to figure out the (surely simple) command for "also copy the first two after the space".

Thank you in advance.

For the complete transformation, try this:
$caps3($left(%YourFieldHere%,2))$caps3($trim($mid(%YourFieldHere%,$strchr(%YourFieldHere%, ),3)))

You don't need the $caps3 function if you are sure both names are capitalized.

A regular expression would also work:
$regexp('Tabatha Fisher',(..).* (..).*,$1$2)

:+1:
In English, there is this proverb: "There’s more than one way to skin a cat" :wink:

2 Likes

Definitely multiple ways to skin a cat, and even more ways to program a simple command. :smiley: Thanks to both of you!

After you have skinned the cat on one of the many routes leading to Rome:
This really only works for first word, then the rest.
It will not work for names that are just a single word like
Avicii
Faithless
Milow
Stanfour.
How will you tread AC/DC?

What happens to longer names like
Diana Ross & the Supremes? How do you differentiate them from the plain Diana Ross?
Some more?
Middle of the Road
Three Dog Night
Manfred Mann's Earth Band
Frankie goes to Hollywood
J. Geils Band
Les Humphries Singers
Lynsey de Paul
Orchestral Manoeuvres in the Dark
and so forth and so on.
So, yes, it is technically possible to automate such a generation. But whether it really makes sense is a different thing.