DF 7 & 8

How am I supposed to format the horizontal position function to place a field according to some condition?

Code:
if {COMPANIA.ECTACXCMOSTRARTIQFISCAL}='S' then
	return  5
else
	return 8.5979
end
This code doesn't work and now the field is placed at position 0

Thanks in advanced.