Number formatting

You can build great collaborative databases with SMW, but it currently lacks when it comes to actually getting the data out exactly as desired - for example in the area of number formatting.

There is currently no way to tell SMW to print out numbers with, say, two decimal places - as it is custom for monetary amounts (see this bug report). As a workaround for this problem, the tiny NumberFormat extension can be used.

An example (a price list generated through an SMW inline query) can be found here.

Basically you use 'format=template' in inline queries and wrap the NUMBER parameters in parser function calls. Please see for details on how to use the NumberFormat extension and look at the templates used in the demo. It is important to switch off SMW's (rudimentary) number formatting for the numbers you pass through.