Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Close

PLM 360 General

- Autodesk Community
- >
- PLM 360
- >
- PLM 360 General
- >
- Re: Computed Money fields showing more than 2 deci...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

338 Views, 6 Replies

02-22-2013 06:44 AM

Hi,

I have noticed that where Money type fields are computed, they are showing more than 2 decimal places. In one case it is showing a huge number of decimal places. I can't see where to change this. I'm guessing there might be a standard instruction to put in the computed field formula to ensure it shows the answer just to 2DP, but I don't know what this is. Can anyone advise?

Thanks,

Fiona

Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-22-2013 12:27 PM in reply to:
fhmurray

Hi Fiona,

I am not sure I fully understand what you mean by computed money field. In PLM 360 you can create a new field and set its type to Money. At which point, the field has a built-in validation that enforces the two decimal places rule. You can test this yourself by adding a new field to your item details page and set the field to type Money, you will find that you cannot input a value of 13.435, but you will be able to input 13 or 13.4 or 13.43.

Are you using a field of a different type e.g. integer or float where you use a computed formula?

Support Specialist

Product Support

Autodesk, Inc.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2013 03:08 AM in reply to:
mazerab

Hi Bastien,

I have come across this problem in both a matrix and the grid - in places it is to do with the field being computed and having the type 'Money' but showing >2 decimal places. In the first example below, it is where a computed field has the type 'Integer' but is showing a vast number of decimal places. Both seem to be where calculations involving percentages are concerned, but this may be coincidental.

1) In the Matrix example, the Contingency % is showing a huge number of decimal places despite being set as an Integer. The calculatation to get this answer is: (SCENARIO_CONTINGENCY_AMOUNT / (QUOTED_SALE_PRICE + PRICE_VARIATIONS))*100

2) In the Grid example below, the 'VAT per item cost' is generated by computing 'PO_TOTAL_NET_ITEM_PRICE * 0.2', with the format of the field set as 'Money' - but the result is showing 3 decimal places.

Similarly the 'Gross Order Cost' is computed with '((PO_TOTAL_NET_ITEM_PRICE * PO_QUANTITY) + PO_DELIVERY_CHARGE) * 1.2' and is also designated as 'Money' type, but shows 3 decimal places.

Any ideas?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2013 05:34 AM in reply to:
fhmurray

Hi Fiona,

When dealing with computed fields, it will in a way bend the rules of enforcement imposed by the field type. To correct this issue you can change your compute field formula to:

ROUND(((PO_TOTAL_NET_ITEM_PRICE * PO_QUANTITY) + PO_DELIVERY_CHARGE) * 1.2,0)

This will force the number to round to the nearest 2 decimal places and will hold the integrity of the field in question.

Support Specialist

Product Support

Autodesk, Inc.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2013 08:26 AM in reply to:
piggeej

Hi Joe,

Thanks very much for the reply. That's very helpful. I take it it is the ,0 before the close of the bracket that does this? In this case of a money field then it would round to decimal places because the 0 would mean don't add any more decimal places? If this were used for an integer, it wouldn't add any decimal places at all, am I right?

Similarly, if I did want it to show 2 decimal places I could add ,2 instead?

Thanks for the prompt response.

Fiona

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2013 09:03 AM in reply to:
fhmurray

Hi Fiona,

The “ROUND(,0) command is telling the system to round to the nearest 2 decimal places, in an money related field, but in an integer setting it would be ROUND(,2).

For more info on the round commands and SQL commands in general see http://w3schools.com

Support Specialist

Product Support

Autodesk, Inc.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2013 09:21 AM in reply to:
piggeej

Thanks Joe. I'll take a look.

- Privacy | Legal Notices & Trademarks | Report Noncompliance | Site map | © Copyright 2014 Autodesk Inc. All rights reserved

Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Please see the Autodesk Creative Commons FAQ for more information.