- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2015 01:59 AM
Hi All,
I have created a field(String data type) and populating average value to that field. The process is fine but its is populating upto 8 decimal points because the field is string type. is there any available attribute(for the variables) to round off the average value and populate the value with only two decimal points(a.bc).
Thanks & Regards,
Swamy
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2015 02:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2015 07:56 PM
You can do an onBefore business rule (insert/update) which gets the value of your decimal field and fixes it to two decimal places:
function onBefore(current, previous) {
var getDec = current.YOUR_DECIMAL_FIELD.toFixed(2);
current.YOUR_DECIMAL_FIELD = getDec;
}
Kind regards,
Mansoor Omar | Technical Support Engineer User Experience