21.9 Manage constants

21.9.1 About constants

Constants are static values which can be made available to users for use in data elements and indicators. Some indicators, such as “Couple year protection rate” depend on constants which usually do not change over time.

In the Maintenance app, you manage the following constant objects:

Constant objects in the Maintenance app

Object type

Available functions

Constant

Create, edit, clone, share, delete, show details and translate

21.9.2 Create or edit a constant

  1. Open the Maintenance app and click Other > Constant .

  2. Click the add button.

  3. In the Name field, type the name of the constant.

  4. (Optional) In the Short name field, type an abbreviated name of the constant.

  5. (Optional) In the Code field, assign a code.

  6. In the Description field, type a brief, informative description of the constant.

  7. In the Value field, define the constant’s value.

  8. Click Save .

    The constant is now available for use.

21.9.3 Clone metadata objects

Cloning a data element or other objects can save time when you create many similar objects.

  1. Open the Maintenance app and find the type of metadata object you want to clone.

  2. In the object list, click the options menu and select Clone .

  3. Modify the options you want.

  4. Click Save .

21.9.4 Change sharing settings for metadata objects

You can assign different sharing settings to metadata objects, for example organisation units and tracked entity attributes. These sharing settings control which users and users groups that can view or edit a metadata object.

Some metadata objects also allows you to change the sharing setting of data entry for the object. These additional settings control who can view or enter data in form fields using the metadata.

Note

The default setting is that everyone ( Public access ) can find, view and edit metadata objects.

  1. Open the Maintenance app and find the type of metadata object you want to modify.

  2. In the object list, click the context menu and select Sharing settings .

  3. (Optional) Add users or user groups: search for a user or a user group and select it. The user or user group is added to the list.

  4. Change sharing settings for the access groups you want to modify.

    • Can edit and view : The access group can view and edit the object.

    • Can view only : The access group can view the object.

    • No access (only applicable to Public access ): The public won’t have access to the object.

  5. Change data sharing settings for the access groups you want to modify.

    • Can capture data : The access group can view and capture data for the object.

    • Can view data : The access group can view data for the object.

    • No access : The access group won’t have access to data for the object.

  6. Click Close .

21.9.5 Delete metadata objects

Note

You can only delete a data element and other data element objects if no data is associated to the data element itself.

Warning

Any data set that you delete from the system is irrevocably lost. All data entry forms, and section forms which may have been developed will also be removed. Make sure that you have made a backup of your database before deleting any data set in case you need to restore it at some point in time.

  1. Open the Maintenance app and find the type of metadata object you want to delete.

  2. In the object list, click the options menu and select Delete .

  3. Click Confirm .

21.9.6 Display details of metadata objects

  1. Open the Maintenance app and find the type of metadata object you want to view.

  2. In the object list, click the options menu and select Show details .

21.9.7 Translate metadata objects

DHIS2 provides functionality for translations of database content, for example data elements, data element groups, indicators, indicator groups or organisation units. You can translate these elements to any number of locales. A locale represents a specific geographical, political, or cultural region.

Tip

To activate a translation, open the System Settings app, click > > Appearance and select a language.

  1. Open the Maintenance app and find the type of metadata object you want to translate.

  2. In the object list, click the options menu and select Translate .

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. Select a locale.

  4. Type a Name , Short name and Description .

  5. Click Save .