Page 1 of 1

How to round value with no precision for only a specific fie

PostPosted: Fri Oct 19, 2012 8:07 pm
by vivekjustthink
Hi,

I have a field "Grand Total". It's reference in Table & Column is "Amount". Currently its precision is 2. Where should i change the precision so that the value is rounded to 1 precision or 0 precision. Please help me out. Thank You!!

regards
vivek

Re: How to round value with no precision for only a specific

PostPosted: Fri Oct 19, 2012 9:14 pm
by globalqss
Hi Vivek, amount uses the precision of the currency, for zero precision you can use integer, for more precision you can use Qty.

I don't think there's an easy way to force precision of 1.

Regards,

Carlos Ruiz

Re: How to round value with no precision for only a specific

PostPosted: Sat Oct 20, 2012 2:19 pm
by vivekjustthink
Hi gloabalqss,

Thanks for your valuable information. Your info was very useful for me. But there is a problem when using integer. The actual value is 1178.76. when i change it to integer it shows 1178. i want it to 1179. i.e the value has to be rounded. This rounding is not done in case of integer.

Thank You
vivek

Re: How to round value with no precision for only a specific

PostPosted: Sat Oct 20, 2012 10:59 pm
by globalqss
Well - in such case I would go to a ModelValidator before save event on that table and round the value.

Regards,

Carlos Ruiz