Page 1 of 1

Rounding a number in a field

Posted: Fri Jun 08, 2012 5:37 am
by bqsbarbqGAnC5Z
Hi everyone,

I'm having trouble with using the round or trunc functions. I have a number in a field called numberfield and I can't seem to round it or truncate it and was wondering if anyone has any advice.

I tried using:
round(field "numberfield") and round field "numberfield"

and I did the same with trunc to no avail.

Any help would be greatly appreciated! Thank you!

Re: Rounding a number in a field

Posted: Fri Jun 08, 2012 5:47 am
by shaosean
round and trunc are both functions, so you need to do something with the returned data..

Code: Select all

put round(field "numberField") into field "numberField"

Re: Rounding a number in a field

Posted: Fri Jun 08, 2012 5:53 am
by bqsbarbqGAnC5Z
Oh wow, I completely overlooked that, I'm still pretty new to this stuff. Thanks shaosean!