Overview tab

Use this tab to specify the general properties of a domain.

General Information
Domain
The unique name of the domain.

A domain is identified by the unique combination of package code and domain code.

Allowed values:

This field is read-only.

You can only specify a domain name when you create a new domain. The domain name is an ASCII text and must start with the code of the package for which the domain is used. After you created a new domain, you cannot change its name.

A good practice is to always include the module code in the domain name. When you fill in a domain name, we recommend the following format:

<package code><module code>.<domain code>

For example, tdsls.hdst is the name of the Header Status domain of the Sales Control module (sls) of the Distribution package (td).

Description
The description of the domain.
Allowed values:

An ASCII text with a maximum length of 60 characters.

Data Type
The data type of the domain. This is the internal representation of data.
For example:
  • string
  • long
  • double
  • date
  • UTC Date Time
Allowed values:
Byte Whole number for which physically 1 byte is reserved.
Integer Whole number for which physically 2 bytes are reserved.
Long Whole number for which physically 4 bytes are reserved.
Float A data type for floating-point numbers, that is, any number containing a decimal point. Physically, 8 bytes are reserved for each float data type.
Double Whole number for which physically 8 bytes are reserved.
String A data structure that contains a number of ASCII characters that represent readable text. Each character consists of a single byte.
Enumerated A data type that consists of a single value from of a list of predefined text values (up to 255). You can define enumerate values with name and language-dependent descriptions on the Enum/Set Constants tab of the Domain editor.

Example:

A field can contain values such as 'yes', 'no' or 'maybe', or color values such as 'red', 'white', 'blue', and so on.

Set A data type that consists of a set of predefined text values (up to 32). You can maintain the set name and its language-dependent descriptions on the Enum/Set Constants tab of the Domain editor.

Example:

The display feature set, which can contain the values 'bold', 'blinking', 'reverse', but also combinations of these, such as 'bold' and 'blinking'.

Date

A data type that represents a date as string in the form YYYYMMDD, where Y stands for the year, M for the month and D for the day of the month. The date can optionally be appended by the time, which has the following format: THHMMSS, where T stands for time, H for hours, M for the minutes and S for seconds.

Example:

Date '19990816T040000' denotes eight o' clock in the morning, August 16th, 1999.

Text Data type used for fields that refer to a text number in the text database.

Example:

To make it possible to link a text to an item in an item table, you must add a field with a domain of the text data type in the item table definition.

Multibyte String A data structure that contains a number of multibyte characters that represent readable text. Each character consists of one or more bytes.
UTC Date Time A time/date format. LN stores UTC Date Time as the number of seconds (a Long value) after the beginning of the year 1970 (00:00:00 GMT, January 1th).
Note: The data type you selected for the domain will largely determine which fields you can fill in for this domain and how you can specify these fields.
Runtime
Convert: Convert Domain to Runtime
This link is only available if the domain is checked in.
Click this link to convert domains and tables to the runtime data dictionary:
  • For LN servers with Enterprise Server 10.5 or later, the Convert to Runtime dialog box is started.
  • For LN servers with older Enterprise Server versions, the Convert to Runtime Data Dictionary (ttadv5215m000) session is started.

    You must be authorized to run this session.

Note: In the Convert to Runtime dialog box or the Convert to Runtime Data Dictionary (ttadv5215m000) session, select the package combination that contains the Project VRC of your current Software Project. Domains and tables in all Activities linked to the software project are converted. Therefore, not only domains in your own Activity VRC are converted, but changed domains in activity VRCs of other developers are also converted.

Read the online help of the dialog box or session before you start the conversion.

Formatting
Length
The length in characters, if the data type of the domain is a (multi-byte) string, or the default display length for data types UTC Date Time, Date, Enumerated and Set. For the latter two data types, the length defines the maximum number of characters of the descriptions of the Enumerated or Set data type. Any description with more characters will simply be cut off at the specified length.
Allowed values:

A whole number in the range 1 – 999.

Allowed values:
Data type Default value
Date 8
UTC Date/Time 15
Other 0
Not Applicable Not relevant for this data type.
Note: You can use this field for the following data types:
  • String
  • Multibyte String
  • Enumerated
  • Set
  • Date
  • UTC Date/Time

The field does not apply to other data types.

Alignment
The alignment method for various components:
  • (multi-byte) strings
  • enumerated values
  • sets
  • dates
Allowed values:
Data type Default value
Not No text alignment.
Left Aligns text to the left.
Right Aligns text to the right.
Centered Centers text.
Not Applicable Not relevant for this data type.
Allowed values:

Not

Note: You can use this field for the following data types:
  • String
  • Multibyte String
  • Date
  • UTC Date/Time

For other data types, the field is automatically set to value ‘Not Applicable’.

Conversion
Conversion method for strings. You can convert text strings into upper or lower case.
Allowed values:
Data type Default value
Not No text conversion.
Lower Case Converts entire text into lower case.
Upper Case Converts entire text into upper case.
Allowed values:

Not

Note: Only use this field for String and Multibyte String data types. For other data types, the field is automatically set to value ‘Not Applicable’.
Internal Format
This field indicates how a number, entered in a form input field with the string data type, must be internally formatted.

For example, if number 37 must be stored as 00000037, use the format 99999999.

Note: Only use this field for String data types. The field does not apply to other data types.
Allowed values:

A formatting text string with a maximum length of 30 characters. Allowed characters are restricted to the following set:

  • -
  • +
  • *
  • Z
  • 9
  • V
  • ,
  • :
Display Format
The display format used in forms and reports to display specific data.
Allowed values:

The value for the display format must be less than 30 characters. To specify a pre-defined display format from the server, use the browse button and select a value from the select dialog box.

Data type Format description
Byte, Integer, Long A string of 'Z' characters followed by '9' characters. The number of characters in the string indicates the number of positions used to display the number. The '9' sign reserves a position for a digit. The sign 0 is displayed if there is no significant digit on this position. The 'Z' sign also reserves a position for a digit, but displays a blank instead of a zero for an empty position.
Float, Double In the format of fractional numbers, the decimal sign is denoted by the letters 'VD'. The '9' sign reserves a position for a digit. In runtime, the sign 0 will be displayed if there is no significant digit on this position. To the right of the decimal point, the 'Z' sign also reserves a position for a digit, but displays a blank instead of a zero if the involved digit is not significant. To the right of the decimal sign ('VD'), .'9' signs are used to indicate the number of decimal places.

When the data type is a double, you can use a generic format. To use a generic format, the display format value must contain ‘%A’. The string that follows %A must be an existing generic format on the back end, for example '%A001'.

For example, if you want to display the number '123.45678' as '....000123.45' (points denote blanks), you must specify display format 'ZZZZ999999VD99'.

Date The format for Date data types must contain '%D' and the string that follows '%D' must exist as a date format on the server, for example '%D001'.
UTC Date/Time The format for UTC Date/Time data types must contain '%u' and '%U'. The string that follows '%u' (until blank character) must exist as a date format on the server. The string that follows '%U' must exist as a time format on the server, for example '%u001 %U002'.
Text

A string of 'Z' characters followed by '9' characters. The number of characters in the string indicates the number of positions used to display the text.

Note: You cannot use this field for data types Enumerated and Set.
Numeric Data
Digits Before Decimal
For numeric data types, the maximum number of digits before the decimal sign. This implies the maximum number of digits for long, integer and byte data types.
Allowed values:

The value for this field is a whole positive number less than 100. For byte, integer and long data types, the following maximum values apply.

Data Type Maximum value
Byte 3
Integer 5
Long 10
Allowed values:
Data type Default value
Byte 2
Integer 4
Long 6
Float 1
Double 6

If the Display Format of this domain contains '%A', the default value of a double is 15.

Note: Only use this field for numeric data types:
  • Byte
  • Integer
  • Long
  • Float
  • Double

For non-numeric data types, the field is automatically set to value 0.

Digits After Decimal
The maximum number of digits after the decimal sign.
Allowed values:

The value for this field is a whole positive number less than 100.

Allowed values:

If the Display Format of this domain contains '%A', the default value for a double is 4. For a float data type, the default value is 0.

Note: Only use this field for Float and Double data types. For whole numbers and non-numeric data types, the field is automatically set to value 0.
Divide Factor
The factor by which the entry in a field is divided.

Divide Factor can be useful for fields containing amounts.

Example:

The Divide factor amounts to 100. When a user enters 25009 in the field for which this factor is set, LN divides 25009 by 100 and displays 250.09.

Allowed values:

A whole number (max. 9 digits).

Allowed values:

1

Note: Only use this field for Float and Double data types. The field does not apply to other data types.
Rounding Method
The way in which a field with the float or double data type can be rounded.

Rounding takes place at the last digit as specified by the number of digits after the decimal point.

Example:

In the following examples, the number of digits after the decimal sign is one.

Entered by user Round off Round off upwards Round off downwards
1.51 1.5 1.6 1.5
2.78 2.8 2.8 2.7
1.55 1.6 1.6 1.5
Allowed values:
  • Round off
  • Round off upwards
  • Round off downwards
  • Not Applicable

For an explanation of these rounding methods, see the previous example.

Allowed values:

Round off

Note: Only use this field for Float and Double data types. The field does not apply to other data types.
Validation
Illegal Characters
The illegal characters that cannot be entered in a form input field.
Allowed values:

All characters are allowed, with the exception that the characters ' " ^ \ must be preceded by a backslash [\], for example \\ and \". Maximum length is 30.

Note: You cannot use this field for the following data types:
  • Enumerated
  • Set
  • Date
  • UTC Date/Time
  • Text

The field can be used for all other data types.

If you define some characters as illegal, all other characters are legal, and vice-versa. Therefore, you cannot use this field if a value for Legal Characters is filled in.

Legal Characters
The legal characters that can be entered in a form input field. If you do not specify any legal characters, all characters are legal.
Example:

If only numbers can be entered in a field with string data type, the legal characters are specified as: 1234567890.

Allowed values:

All characters are allowed, with the exception that the characters ' " ^ \ must be preceded by a backslash [\], for example \\ and \". Maximum length is 30.

Note: You cannot use this field for the following data types:
  • Enumerated
  • Set
  • Date
  • UTC Date/Time
  • Text

The field can be used for all other data types.

If you define some characters as legal, all other characters are illegal, and vice-versa. Therefore, you cannot use this field if a value for Illegal Characters is filled in.

Range
The range used to check the validity of the input. If you enter a value in a form input field outside the specified range, LN produces a range message and will ask for input again.
For simple validation checks, you can use the following:
  • The data type
  • Legal and illegal characters
  • The length of the field
  • The number of digits before and after the decimal point

For more complicated validation checks, you need the range attribute.

Examples of restrictive ranges:
A string starting with a capital $$ in ^[A-Z].*$ (regular expression)
Allowed values:

The range can be an expression with evaluated value true (valid value) or false (invalid value) (true <> 0, false = 0). Other variables can also be used in the expression. To test the current value in the expression, use 2 dollar signs: $$

The following operators can be used (listed in order of decreasing precedence):

Operator Description Example   Operator Description
( ) expression in brackets 2*(3+5)   = equal to
IN range test $$ IN [10,20]   <> not equal to
- unary minus -10   <= equal to or less than
^ raise to power 2^3 = 8   >= greater than or equal to
* multiply 2*3 = 6   < less than
/ divide 6/2 = 3   > greater than
\ remainder 3\2 = 1      
& string concatenation "A"&"B" = "AB"   not logical negation
+ addition 2+3 = 5   and logical and
- subtracting 2-3 = -1   or logical or
Note: You cannot use this field for data type Text. The field can be used for all other data types.
Range Message
The name of the message, including package code, which is issued if an entered value falls outside the specified range.
Allowed values:

You can use the browse button and select a message name from the select dialog box. This dialog box contains all messages available in the package of the domain. You can also enter an existing message name.

Range Message Description
The actual message as shown when activated.
Note:  Range Message Description is an information field. You cannot change the message, because the field is read-only. You can create messages in the Message Editor.