2 Replies Latest reply on Oct 25, 2010 8:09 AM by philmodjunk

    How to format a decimal field with a custom unit ?

    wladdy

      Title

      How to format a decimal field with a custom unit ?

      Post

      Let's say that I have a number field called 'Length'.

      On a given layout, I want to display the values of 'Length' with the sufix ' cm' appended at the end. Is there a way for me to define a custom format for a digitial number, as can be done in Access?

      Otherwise, I see a few workarounds but none is quite what I want:

      1) I could add a text label to the right of the field. Okay, but the result will be very ugly is I don't want to align to field to the right.

      2) I could create a new calculated field concatenating 'Length' & ' cm', but with that approach I could reach dozens of such fields in a table just for layout purposes. Surely, there must be a more economical way.

      3) I could use the Currency format, with ' cm' as the currency symbol. This solution is closest to what I want to achieve but I find it very inelegant - as a database user, I like categories to be properly used and assigned. Furthermore, this probably will stop working if I ever populate my field with number having more than two decimal digits.

      Any other suggestions to add a custon format to a decimal field would be greatly appreciated.