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)

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


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
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.

1 Like

Good foresighting

I myself a long time ago I tried to come up with some sort of system for adding automatically [or at least half-automatically] abbreviations of titles of albums and / or years of the release to the TITLE tags - so that I would know what version is which and I do not see same titles on a list

I though long and hard but all in all came to a conclusion that this was simply impossible as there were too many exception and various special cases