In the current release, output numbers are always formatted with two decimal places at most. Input numbers are left alone. This is obviously quite limiting, and providing you with better control has been at the top of our to-do list for a while now. To format numbers, you use the new inspector at the left-hand side of the window:
Use the Decimals, minimum and Decimals, maximum fields to specify the number of decimal places your number should be formatted with. (If these numbers are zero and two, 3.14159 is formatted as 3.14 and 2.10 is formatted as 2.1.) Thousands separators are used by default, but you can click the switch to turn this off. For numbers which have an initial value, you can now make them read-only, meaning that the user won’t be able to change them.
You can also format your number as currency by clicking the $ button:
By default, such numbers are displayed in red if they are negative and use an appropriate currency symbol. Also, negative numbers are displayed in parentheses if you leave the “accounting style” enabled. Change the currency using the provided drop-down menu:
You can also format a number as a percentage by clicking the % button:
By default, numbers formatted as percentages are displayed with a trailing “%” symbol. In addition, they are automatically scaled, meaning that if the user enters the value 50, the actual value used in calculations is 0.50. This feature should make your formulas easier to read, now that you no longer have to divide entered numbers by 100 manually.
There are more options available in the drop-down menu. Select Fraction to format numbers as fractions:
When you format a number as a fraction, Calcapp will try to find the most appropriate fraction to display (which is closest to the actual value). Use the drop-down menu to specify which behavior to use:
Finally, select Scientific from the drop-down menu to use scientific notation. With scientific notation, 10000 is displayed as 1.00E+04. It’s a great way to present numbers that are either very large or very small.
To save time, remember that you can format many fields at once. Simply check the box next to all fields you are interested in (say, all fields that display prices) and change the properties you’re interested in. You will find that your changes are applied to all checked fields.
We still have not discussed the ability to format numbers as dates and times. This is the topic for a separate blog post.
Note: Number formatting is currently quite US-centric. Calcapp uses a decimal point instead of a decimal comma (decimal commas are used in largs parts of the world) and commas are used as thousands separators (while other locales use a space as a separator). With an engineering team located in Sweden, we are acutely aware of these limitations. Rest assured that we are keeping the rest of the world in mind as we build Calcapp and that the future will bring far better support for other locales.