You have to use the introductory clause. You can write each formula like:
//{@field1}:
stringvar array x := split({table.field},"-");
if ubound(x) >= 1 then
x[1] else
{table.field}
//{@field2}:
stringvar array x := split({table.field},"-");
if ubound(x) >= 2 then
x[2] else
{table.field}
//{@field3}:
stringvar array x := split({table.field},"-");
if ubound(x) >= 3 then
x[3] else
{table.field}
-LB