--- title: "Unit conversion" slug: "fre-unit-number-input-vo-unit-conversions" updated: 2026-05-07T12:43:21Z published: 2026-05-07T12:43:21Z canonical: "docs.lobstersoftware.com/fre-unit-number-input-vo-unit-conversions" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Unit conversion [Unit number](/v1/docs/en/fre-unit-number-input-vo) will automatically convert number values upon unit change in a form if all of the following conditions are met: - The option "Convert values" is checked for the [Combobox](/v1/docs/en/fre-combo-box-vo) (see [Unit number](/v1/docs/en/fre-unit-number-input-vo)). - The configuration for [Units](/v1/docs/en/core-unit) provides a "conclusive link" for conversion between the units involved. In all other cases, a change of the unit does not affect the numeric value. The conversion logic described in the following may apply for the following contexts: - [Assigning numeric values with units](/v1/docs/en/fre-unit-number-input-vo-assign-unit-number) - [Calculate value](/v1/docs/en/core-calculate-value-resolver) resolver in [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration) - Calculation function [CALC](/v1/docs/en/fre-calc-calc) for [Calculation field](/v1/docs/en/fre-calc) ## Conversion logic In a simple scenario the configuration of the units to convert between refer to the same base unit. This is also formally given if one of the two units *is* the base unit. | ... | Localized name | Alias | Base | Base value | | --- | --- | --- | --- | --- | | | Kilogram | kg | kg | 1 | | | Ton | t | kg | 1000 | | | Gram | g | kg | 0.001 | - This configuration enables conversions between any two of the units involved (Gram, Kilogram and Ton). However, it is not a requirement to refer to the same base unit for all units in the same dynamic enumeration: | ... | Localized name | Alias | Base | Base value | | --- | --- | --- | --- | --- | | | Kilogram | kg | g | 1000 | | | Ton | t | kg | 1000 | | | Gram | g | g | 1 | - This configuration also enables conversion between any two the units involved (Gram, Kilogram and Ton). - If necessary, multiple conversions are "cascaded" to accomplish the task. This may involve units that are not "Active entries" in the selection box. - As the default configuration for [Time unit](/v1/docs/en/core-time-unit) illustrates, this cascading approach creates transparency in enumerations for units covering a large numerical range. ## Conversion and rounding The final result of a potentially cascading conversion calculation will be rounded according to the settings for the value (see [Unit number](/v1/docs/en/fre-unit-number-input-vo)). Example: - The value fied is restricted to "Numbers only" and "Number of Digits" is set to 1. - The current values read: 1750.0 "Kilogram" - After switching the unit from "Kilogram" to "Ton" the value reads: 1.8 - After switching back from "Ton" to "Kilogram" the value reads: 1800.0 When the unit is changed, the rounded value is immediately stored as a change of the value. ## Possible source of errors: "Loops" in conversions Cascading conversions introduce the risk of "loops" or infinite cycles, as a result of inappropriate unit configurations. | ... | Localized name | Alias | Base | Base value | | --- | --- | --- | --- | --- | | | Kilogram | kg | g | 1000 | | | Ton | t | kg | 1000 | | | Gram | g | kg | 0.001 | - Here one of the conversion definitions is "mirrored" by another, which results in an infinite loop over kg►g►kg►etc. The following example contains a less obvious loop: | | Localized name | Alias | Base | Base value | | --- | --- | --- | --- | --- | | | Kilogram | kg | g | 1000 | | | Ton | t | kg | 1000 | | | Gram | g | t | 0.000001 | - Here the loop closes across all three units in the list: t►kg►g►t►etc. Unit configuration loops must be carefully avoided, as infinite cycles in conversions may spontaneously freeze the HTML client when a unit selection changes.