Hi. Both formulas worked, but Nameparts was better as I discovered I had some records with multiple spaces in that field. I was able to use the following formula:
Local StringVar array Nameparts := Split({st_code55.description});
if {st_code55.description} startswith ["CTS", "PT", "OT"] then
Nameparts [4] else
Nameparts[2]
The only other thing I want to do in this formula is display "Unassigned" if the field is null. I tried to add this to the formula (see below), but it left the null as blank. Any ideas:
Local StringVar array Nameparts := Split({st_code55.description});
If IsNull({st_code55.description}) then "Unassigned" else
if {st_code55.description} startswith ["CTS", "PT", "OT"] then
Nameparts [4] else
Nameparts[2]