Codelist manager

<< Click to Display Table of Contents >>

Administration > Menu reference > Administration > Codelists >

Codelist manager

 

In dpSpatial, code lists are used to offer predefined values in attribute forms via drop-down lists. This ensures consistent data entry and improves both data quality and searchability of the database.

A code list is a table with at least two fields:

CODENUM - A unique code value that is stored in the database.

CODETEXT - The attribute value displayed to the user in plain text.

In dpSpatial these names are often used, but it is possible to use other field names. The important thing is that the key field is always unique. When an attribute is assigned a code list value, only the CODENUM is stored, allowing more efficient database searches.

The system allows you to edit existing code lists, but you cannot create completely new code lists on your own. Contact Digpro if you need new code lists.

To use the codelist manager, the MANAGECODELISTS role is required.

You can manage code lists by, for example:

Editing existing values.

Adding new values.

Removing values.

Enabling/disabling values.

Adding specific documents to code lists.

Example of code list

 

Advantages of code lists

Faster searches through numeric code values.

Longer text strings possible without performance impact.

Reduces the risk of incorrect or inconsistent attributes.

 

Open the codelist manager

1.In the menu bar, select Administration > Codelists > Codelist manager.

 

Manage code lists

Edit an existing field value

1.Select the row and press Edit row .

2.Edit the fields. All fields in a code list are editable, except for the key field and the dp_subtype field if applicable. Mandatory fields in the code list are marked with an asterisk (*).

3.Press Save.

4.Press Update server for the change to take effect.

 

Add rows

Do not add new rows to a code list unnecessarily. It may be difficult to remove these rows at a later stage as there may be objects that use them.

1.Press Add .

2.Fill in the fields. Fields marked in pink are mandatory. Numeric keys are generated automatically.

3.Press Save.

4.Press Update the server.

 

Activating and deactivating rows

If a code list contains a field with the field name ACTIVE, it is possible to activate or deactivate row values in the code list. Disabling instead of deleting a value can have its advantages - it is easy to perform on your own and it is quick to restore disabled values.

This is how active/inactive values are represented in the code list:

"1" (true). Checked checkbox. The value is active and appears in the code list drop-down lists.

"0" (false). Unchecked checkbox. The value is inactive and can be displayed via the Select historical value option in the attribute form drop-down lists.

 

1.Select the row and press Edit row .

2.Check/uncheck the Active value checkbox to activate/deactivate the value.

3.Press Save.

4.Press Update the server.

 

Delete rows

 

There is no support in the codelist manager for deleting rows from code lists. The reason is that you should not be able to delete code list rows that are used by objects in the system. If this were to happen, the system would become unbalanced.

Cleaning of code lists is best done in consultation with Digpro.

 

If you really want to remove a row from a code list, you must first:

1.Make sure that the key value of the row is not used by objects in the system.

2.Delete the row manually in the database using SQL.

 

Advanced settings

Activate or inactivate fields

It is also possible to disable certain fields in the code list manager by configuration. These fields will then not be visible in the code list manager.

The configuration is made in the codelist_translation.conf by specifying the parameter <column name>.hide=true

It is possible to enable a previously disabled field if needed.

Do not hesitate to contact your customer manager at Digpro or the Digpro support  for more information or if any further questions.  

 

Edit column order

By configuration it is possible to change column order in the code list manager. Example: if adding a new row or editing an existing row it is possible to configure the column order.  

The configuration is made in the codelist_translation.conf by specifying the parameters columnOrder=column1,column2,column3 etc.

Do not hesitate to contact your customer manager at Digpro or the Digpro support  for more information or if any further questions.

 

Edit several rows

By configuration it is possible to edit column values for several rows at the same time in the code list manager.

The configuration is made in the codelist_translation.conf by specifying the parameters multiEditColumns=column1,column2 etc.

Contact your customer manager at Digpro or the Digpro support  for more information.

 

Options in the codelist manager

Drop down menus

Function

Code list owner

Select code list owner. Example: FFP, PIPING, or DSG.

Code list

Select code list. The code list drop down menu will display all codelists owned by the selected code list owner.

Subtype

Select subtype. Selectable code list values may be defined to be controlled by an objects subtypes. The value for each subtype ,where applicable, will be typed in the code list. Note, subtype is selectable only if the code list take subtype into consideration.  

 

 

Mandatory fields

Code value (CODENUM)

The code lists primary key field that contains code list value.

Text (CODETEXT)

Text string describing an object- or subtypes attributes. This is the same text that is displayed as text options in the drop down menu in the object types attribute form.

 

 

Function fields

DP_SUBTYPE

The field is required to use the subtype-dependent code list values. Existing values are locked for editing in the code list manager.

ACTIVE (Active value)

The field is required to enable / disable selected code list values.

 

 

Read only fields

Rendered value

Some texts in CODETEXT are html formatted. Rendered value shows how the text looks converted.

 

 

Buttons

 

Assign display flag

Assigns display flag values ​​from a database sequence. The button is activated if there is a display flag column in the code list.

Add

Add new values to the code list.

Create copy

Create a copy of an existing row.

Edit row

Edit individual values ​​in the code list.

Export to spreadsheet

Export code list content to spreadsheet.

Update server

Depending on the operative system settings for caching, it may be necessary to update the server for saved changes to be activated.  

Close

Close the code list manager. Note, changes that has been made will not be saved by default.

 

 

Manage code lists via attribute forms

Show which code list a drop-down list uses

1.In an attribute form, right-click on the arrow of a drop-down list.

2.Select Show all codelist values. A window opens with all the values in the code list. In the name list you can see which code list is used.

The drop-down list must display a code list value for it to work. If the option is Undefined, select another value first.

You can also right-click on the arrow of a drop-down list and select:

Open the codelist manager - Edit the codelist directly from the attribute form.

View codelist documents - Open and review documents attached to a code list. Use the View button in the window that opens.

 

Select a disabled code list value

In attribute forms that have the Select historical value in a drop-down list option, you can use this to view and select disabled values.

 

View code lists that exist in the system

1.Select Administration > Metadata Manual. The metadata manual opens in the browser and lists all components, object types and code lists. Here you can see how code lists are linked to different attributes. At the bottom is a summary of all code lists sorted by code list owner.