Maybe this could work as starting point?
Names Default To Here(1);
dt = New Table("Test_Recode",
Add Rows(9),
Compress File When Saved(1),
New Column("Plate",
Numeric,
"Continuous",
Format("Best", 15),
Set Values([1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]),
Set Display Width(48)
),
New Column("Name",
Character(3),
"Nominal",
Set Values({"T0X", "T0Y", "T0Z", "T0X", "T0Y", "T0Z", "T0X", "T0Y", "T0Z", "T0X", "T0Y", "T0Z"}),
Set Display Width(48)
),
New Column("Recode Output",
Character(3),
"Nominal",
Set Values({"T01", "T02", "T03", "T04", "T05", "T06", "T07", "T08", "T09"}),
Set Display Width(95)
)
);
dt << new column("test", Character, << Formula(
"T" ||
If((:Plate-1)*3 < 9, "0", "") ||
Char(Match(Right(:Name, 1),
"X", 1,
"Y", 2,
"Z", 3
) + (:Plate-1)*3)));
-Jarmo