Custom Entity forms / Property editor

When creating an Entity (CI, Contract, Knowledge base article) a form is opened where you add the data. As Administrator you have much freedom to customize these forms using the form builder.

When adding some types of fields to the form what you in fact are doing is deciding the properties of the Entity. Using the “Hidden” trait on a field you can also add properties that not are visible for the user, but only used for instance in Trigger scripts.

Form builder

For each type of Entity you find the form builder if you go to (replace “Entity” with the desired type; CI, Contract, Knowledge base article):

Configuration> “Entity” Management> “Entity” Type > Add “Entity” type or mark row of Entity type and click Edit properties.

To add a field to the main form use drag and drop. You can place fields side by side if the field width allows it.

Different fields have different sets of attributes and behavior options. Mark the field on the form on the left hand side and the field traits will show. Here is a description of the traits

Mandatory field (M) – Available on all field except the Text area. When this checkbox is marked the user cannot submit the Entity without entering data or choosing a value to this field.

Field Label (L) - All fields have this. The system gives all fields a default name “Untitle nn” so you always need to enter a caption of your own. To handle any translation to multiple languages a separate form is opened when adding field name.

Field width (W) - All fields have this. You can choose the width of the field in percent of the width of the form. The default value is 25%. If the collective width of fields placed side by side exceeds the form width, the field to the far right will be moved to a row of its own.

Hidden (H) - Available on all field except the Text area field. The fields does not show when the form is presented for the User. We recommend this for old properties that is no longer in use as deleting a property will make the statistics invalid. This can also be used for properties that not are of interest for the user but used in Trigger scripts “in the background”.

Show in info panel (P) – All fields have this. If this checkbox is marked the field will be added to the left hand panel when creating or editing Entities. The order in the left panel from the top down corresponds to the order in the main form, row by row from the left to the right.

Translatable entity content (T) – This transaction is valid for the Text field and the Text area.

Translation

If you use several languages in your system you must see to it to all field names, any choices and field content have proper translations.

Text content translation

For the fields where the Translatable attribute is set, language keys will be created for all installed languages for the content of this field. When an object is created using any Entity Type (form), the text you write in the field will always be stored in the tag of the NSP Standard language. Go to the Translation manager|topic=Edit Translation keys and use the value entered in the Standard language tot the other languages. 

Here is how you handle the translation:

1.  Create the Entity

2.  Enter text in the field that is marked as Translatable. Make a note of it.

3.  Goto AP> Configuration> Manage> Language & Translation> Translation management.

4.  Select the language you want to make a translation for in the field Translation language.

5.  Mark the Search field and write the text from 2.

6.  Click edit on the tag and enter the translation.

You can also search using the GUI-tags Translation keys names. This is however a little trickier. The keys are named in the following manner, where “XXX” is a random number and “fieldvalue” is a merge (without spaces) of the text written when the Entity is created.:

   Service items - ServiceItemProperties.XXX.fieldvalue

   KB Articles - ArticlePropertyValues.XXX.fieldvalue

    Contracts -  ContractPropertyValues.XXX.fieldvalue

    CIs - CiPropertyValues.XXX.fieldvalue

 

Translation of field name and multiple choice items

When clicking on either the field for the component name or when adding choices to choice components (Checkbox group,  Dropdown, Radio Button Group) the translation form opens. Here all active languages are listed. The NSP Standard language is marked with bold.

If you write a value in the field for the standard language (English in the picture above) and then click Suggest translation the system searches the database and if the same value has been used before, suggest translations. If no prior translation is found the translation key name is shown.

 

Field type descriptions…

Button

Field

Standard traits

Special traits/ Comments

Text

M, L, W, H, P, T

Default – Write a text that is there already when the Entity is created.

Number

M, L, W, H, P

Default – Write a text that is there already when the Entity is created.

Decimal number

M, L, W, H, P

Default – Write a text that is there already when the Entity is created.

Precision – Decide how many decimals are to be shown.

If the field is set from an external source and this number has more decimals than the set number it will be truncated.

Text area

M, L, W, H, P, T

 

Checkbox

M, L, W, H, P

 

Checkbox group

M, L, W, H, P

Choices (Add choice)For every item you add a new check box is created in the group. All items are independent and several items can be checked by user. The items can be translated

Dropdown

M, L, W, H, P

Choices (Add dropdown choice) – For every item you add a choice is added to the list. The items can be translated.

Date Picker

M, L, W, H, P

The system automatically sets the date format according to the language chosen by the User.

Time Picker

M, L, W, H, P

The format is determined by the setting done in Account management> Date and Time Settings.

Date and Time Picker

M, L, W, H, P

The system automatically sets the date format according to the language chosen by the User.

Radio Button Group

M, L, W, H, P

Choices (Add choice) - or every item you add a new button in the group. All items are dependent and only one choice can be made at any given time. The items can be translated.

Info

L,W

Note that this field type only has a Label and Width trait. You write the text content but It is not translatable.

Reference

M, L, W, H, P

Entity – Choose in the list of Entities and Types.

Dependent field - For some entities you can create Dependent field.

Field type – You can choose in what way the existing Entities shall be displayed:

Drop down – Shows a list of all created posts of the chosen type.

Auto complete – User starts to write the Entity name after which the system fills in the rest.

Combo box – Here user both can choose from a list or write a search string.

 

Note! Even if all custom fields can be deleted we strongly advice against this as it will make the statistics invalid and hinder you from comparing reports. Use the Hidden trait instead.