PDF creator - no decimal for numeric values

Im having a problem with the PDF creator whereby the numerical values are being shown as a whole number. The field itself and the data in the sheets show as a decimal.

How can I make the numerical value show correctly in the PDF template?

Hi @britanniaplumbers

Can you elaborate a bit on the issue you are facing.

  1. Which control are you binding with PDF task (is it numeric variable?)
  2. If it is numeric variable, have you provided decimal precision property greater than 0?
  3. What is the Type of Variable you have added in PDF Editor (It should be Text type variable)

It seems to be working fine for us, check this pdf generated for reference which shows upto 2 decimal points as that was configured for numeric control

Hope this helps!

It is now working with numerical but only for fields that have manual input. Numerical fields that have formulas based on another field only show 2 decimal places if it is not a whole number.

My values are currency so need so show .00 at all times. I used currency fields before and it never worked.

Hi @britanniaplumbers

So what I understand is you need to run a formatter to display even a whole number with 2 decimal. In that case you need to have a formula run on your value to generate format of your choice.

For example - in the above scenario where you want max 2 decimal digits irrespective of input value, lets add 2 more text control 1 a mod and another called formatter and in that we added below formula -

Formula for Mod Control -

ROUND( MOD( ROUND(numeric,2) * 100 , 100) , 0)

Formula for Formatter Control -

IF( mod = 0 , CONCATENATE( ROUNDDOWN( numeric , 0) , ".00") , IF( mod < 10 , CONCATENATE( ROUNDDOWN( numeric , 0) , ".0" , mod) , CONCATENATE( ROUNDDOWN( numeric , 0) , "." , mod)))

Where numeric is the unique name of the Number control which either user inputs the value or getting the value from other formula.
Refer screenshot for reference -

Now whenever user types the value in number control, the Formatter control will auto-calculate the value to have fixed 2 decimal digits as shown in below screenshot -

Let me know in case of any queries.
Hopefully this helps!

This seems like a crazy work around, having 3 fields instead of 1? It also doesn’t make sense because the field displays the value correctly, it just when it is displayed on the PDF, it rounds to a whole number.

Hi @britanniaplumbers

Yes this seems a relatively lengthy solution currently. We will soon be adding function related to Number formatter like we have it in Excel using TEXT formula, so this is a temporary workaround.
If you are not in urgent need and can wait for that enhancement then I will update you as and when it is released.

Also, If you are interested in technicality as to why this is not the case with Numeric control is because what you see is formatted value and when you focus on the numeric control - it is the actual value. in programming - 10.00 is treated and stored as 10 by default. So, it will involve formatted value “10.00” that would be a String/Text and not a number to achieve the same.

Hope this Helps!