Dear sirs, I've a code that shows a message that shows and import, this import came from the division from two fields. The code is similar to:
importvar:=(Item."import1")/(Item."import2");
MESSAGE:='You must sum '
+FORMAT(importvar)+' to the cost';
The problem is that the message shows a lot of decimals, dependes of the import, and I want that it only shows 2 decimal places. The import1 and import2 fields are decimal type and have 0 decimal places in their properties, but I don't know how to do the same on the var. Any idea please?.
Thanks in advance.
0
Comments
You can use formatting instructions. For example, you can format your message like this:
MESSAGE:='You must sum '
+FORMAT(importvar, 0, '<Precision,2:2><Standard Format,0>' )+' to the cost';
This will show only 2 decimal places.
Damir
Thank you very much for your help.