Hi Bertje,
AFIELDS() will return an array with all fields (an thier properties) of a table. Locate the field you want in it than I think yourArray(3) will return the length of the array (see MSDN to be sure under AFIELDS()).
Then I'd use the following command :
replace yourField with val(replicate("9",theLengthOfYourField))
and for negative values :
replace yourField with -val(replicate("9",theLengthOfYourField -1 ))
Hope it helps...