Create Units for Your Forms in the Case Module

You can create as many different types of Units as you need, and then link them to numeric fields in your forms.

Background

The field types Number and Calculation do not have units linked to them by default and display information in fields as integers. Using the Units function, you can add units to specify and convert information, as well as influence how information is displayed in fields linked to the respective unit group.

Common examples of using Units include volume, weight, length, time, or currency. Essentially, wherever there is a need to convert between units.

  • Only Administrators have the ability to manage Units. The function is located under Case Management » Settings » Units.
  • Administrators and users with permission to edit forms can then link unit groups to the field types Number and Calculation fields. Read more about this below.

units

Add Unit Group

Start by creating the foundation for your unit using the Add Unit Group function. The settings you can configure are:

1. Name: Choose a name that reflects what the unit will manage to make it easier when linking units to numeric fields in your forms.

2. Show in Saved Unit: When this function is disabled, the unit’s Base Unit will be displayed in the case. Note that even if the system displays the base unit, the case will be correctly saved with the unit selected during registration. When enabled, the case will also display the unit chosen during registration.

3. Inflation: Used for currency management. Allows adjustments to exchange rates without affecting already registered cases.

4. Decimal Separator: Choose between a dot (0.0) or a comma (0,0).

5. Decimal places: Select whether the unit should display 0-3 decimal places.

6. Thousand Separator: Choose how the unit will display thousands: None, Dot (1.000), Comma (1,000), or Space (1 000).

Manage Unit Group

Base Unit

The first unit you add to a new unit group is saved as the Base Unit and has the value of 1.

The Base Unit is the foundation of the unit group and serves as the reference value for conversions when adding subsequent units to the group.

Edit Unit Group

  • To change the name or factor of a unit, click on the created unit name.
  • Under the button resembling a block and pen, you can: Access and modify the basic settings of the unit group, view linked forms and the fields in the forms that use this function.
  • In this view, you also have the option to deactivate the unit group. Values can still be entered in the field, but they will be saved without a unit.
    Note: Previously registered cases will lose the saved unit upon deactivation. If the unit group is reactivated, the unit saved during registration will reappear.

units(gif)

💬 Tip: Display decimals in the Number field type using a Unit Group. A number field in a case will always display as whole numbers if no unit group is assigned to the field.

  • If you need to show the exact input during review when using the Number field, you can create a Unit Group containing only the Base Unit with the setting to display decimals. This Unit Group can then be linked to the number field. Registered values will then display with decimals instead of only whole numbers.

💬 A Few Examples


Distance
Here, we have used kilometers as the base unit and added the option to convert to miles. Using the “+” button, miles were added with a factor of 1.609.

 distans_

 

When a case has been registered, the reader can convert the number of kilometers to miles and vice versa within the registered case.

byte av enhet i ärende

Currency

When creating the Currency unit group, you can activate:

  • Display in Saved Unit and
  • Inflation.

By activating Inflation, you can adjust your exchange rates without affecting already registered cases.

Unit_currency

Link Unit Groups to Number or Calculation Fields

Once your units have been created, they need to be linked to the fields where you want to use the corresponding unit. Unit groups can only be linked to the field types Number andnumbers_units Calculation.

To link a unit: Navigate to the form (Case » Settings). In the form, select the field you want to assign a unit to and choose the appropriate unit group from the list. Don’t forget to save the form.

Note: We do not recommend changing the unit group on a field in a form that already contains registered data, as this can lead to misleading results. For example, if previously registered data used the unit miles and the unit is changed to kilograms, the values may become inconsistent.

Currently, the system does not issue a warning when making this change.


Last updated: 28 January, 2025