These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Pounds to Kilograms conversion

autumnscooby
Registered: Oct 21 2011
Posts: 2

I have created a form and I would like to be able to just type in the quantity (pounds) and have a field automatically fill in the kilograms that it converts to. I tried formatting the Kilogram field to be the product of the pounds field & 0.4536 (to aviod writing a simplified notation or script for dividing by 2.2046). Please advise any solution you can think of, it is greatly appreciated!
Thank you!

My Product Information:
Acrobat Standard 9.0, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Are you sure you are using the correct values?

You might have a problem with your level of precision for the values in your calculations.

1 pound = 0.4535923703 kilograms or there are 2.20462262039067 kilograms per 1 pound.

This should get you to 99,999 pounds before you will see a fractional difference at 10 decimal places.

George Kaiser

autumnscooby
Registered: Oct 21 2011
Posts: 2
Does Adobe not like multiplying decimals? When I choose to have ResultsC = The caluculation product of ValueA (# pounds) and ValueB (0.4535923703) it just copies whatever is in ValueA's field. But if I choose ValueB to be a whole number it works fine. I only need to show 2 decimal places but this caluclation is driving me crazy. Thank you for your input!
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can specify the format as 'Number' and specify the number of decimal places for display. The value of the result field will still be carried out as much as possible. If you need to round or truncate the computed value then you need to use a custom JavaScript to round or truncate the computed value.

You are not very clear as to which calculation option you are using and what values you are entering.

Assuming your result field is "ResultsC" and your pounds field is "ValueA" and the conversion factor field is "ValueB". All the fields are "text" fields with a "Format" of "Number" and "Decimal Places:" of "2". Field "ValueB" has an "Options" "Default Value:" of 0.4535923703. Use the same "decimal separator" style for all fields.

For the field "ResultsC":

For the calculation option of "Value is the 'Product (x)' of fields:":
Pick fields "ValueA" and "ValueB".

For the "Simplified Field Notation" option enter:
ValueA * 0.4535923703

For the "Custom calculation script: enter:
event.value = this.getField("ValueA").value * 0.4535923703;

Note that the last two methods can use a constant value.

There are well known issues when converting base 10 decimals to binary decimal equivalents, but you will not see them at 2 decimal places and multiplication.

George Kaiser