DocuGen can insert numbers from your board into your document using values from Numbers columns, Formula columns, and Mirror columns.
You can insert numbers in one of two ways:
- As part of a table, using tabular placeholders
- In-line within the text of the document, using single-value placeholders
Tabular placeholders
When inserting numbers into a document using tabular placeholders such as <<table_body>> or <<subitems_body>>, DocuGen will insert numbers in the US/UK format:
12,345.67
If you prefer the European number format, check out the section below in this article.
For Numbers columns, DocuGen will include the same units you specify in your board column settings, such as $ or €. For example:
Units are not automatically included in Formula columns. You need to specify the Formula column units in the table styling in your DocuGen view's Settings tab. For example:
Single-value placeholders
Single-value placeholders allow you to insert specific values inline within the document text. They have the general format <<column_firstrow:COLUMN LABEL>>.
When inserting a number into a document using a placeholder, DocuGen will insert dates in the US/UK format:
12,345.67
If you prefer the European number format, check out the section below in this article.
DocuGen will NOT include the units you specify in your column, such as $ or €. For example:
If you want to include the units, make sure they are part of the template. For example:
European and non-US formats
Although DocuGen currently only supports US number formatting, you can display numbers in your document in the European format using the simple workaround below. For example:
12.345,67 €
(equivalent to €12,345.67 in US/UK format)
(🤔 If you are looking for better support for different number formats, vote for it here!)
Simply add a formula column to your board to convert the number format. Copy the following formula into your new formula column:
if({Amount}>=1000,rounddown({Amount}/1000,0) & "." & right("000" & rounddown({Amount} - 1000*rounddown({Amount}/1000,0),0), 3), "") & if({Amount}<1000, rounddown({Amount} - 1000*rounddown({Amount}/1000,0),0) ,"") & "," & right("00" & (({Amount}*100) - rounddown({Amount},0)*100),2) & " €"
You will need to replace "Amount" in the above formula with the actual name of the column containing the numbers you want to format. Don't forget to use the formula column you just created above in the template placeholder. For example:
Note that the above formula has the following limitations:
- It's limited to a range from -999.99 to 999,999.99 (in European format: -999,99 to 999.999,99).
- Blank numbers will result in an error.
Comments
0 comments
Please sign in to leave a comment.