Field Masks

Prev Next

Field masks allow you to limit the input options that users have for text or keyword fields. You do this by assigning a mask to a field that only allows entries in a specific format. For example, you can use a mask to support the input of long numeric values, such as those used for insurance policies. DocuWare includes some predefined masks and also gives you the option of defining your own masks.

When field masks are defined you can assign them to any dialog field.

Store dialog

Search dialog

Index dialog

Mask Definitions

Mask definitions are created in the form of Regular Expressions. The use of Regular Expressions ensures that only character strings that follow a specifically defined pattern can be entered in a field. Regular expressions are composed of characters in the basic alphabet in combination with meta characters ([, ], (, ), {, }, |, ?, +, *, \, .). All other characters of the alphabet stand for themselves.

The following expressions are an extract of the variants available to you:

  • [A-Za-z0-9]: any Latin character or any number

  • [0-9]: a number from 0 to 9

  • [A-Z]: an upper case Latin character

  • \d : a number [0-9]

  • ? : The preceding expression is optional, it can occur once, although it does not have to, it occurs zero or once.

  • {n} : The leading expression must appear exactly n times; {n,n}: The leading expression must occur at least once (the first n) and may occur a maximum of x times (the second n).

Examples:

  • Entry of a nine-digit number: [0-9]{9}.

  • A character string that consists of five or six numbers, followed by two or three upper case letters: [0-9][5,6][A-Z]{2,3}.

Fields of Applications

IBAN

[A-Z]{2}[0-9]{2}[A-Za-z0-9\s]{11,30}

The international IBAN code always starts with two capital letters as the country code and a two-digit checksum. Depending on the country, this is followed by 11 to 30 digits or letters for the bank code and account number.

BIC

[A-Z]{6}[A-Z0-9]{2,5}

The BIC or SWIFT code is an internationally standardised bank code. Every participating credit institution can be identified with the BIC. The code has a length of 8 or 11 alphanumeric characters according to the following scheme: BBBBCCLLbbb.

BBBB stands for the four-digit bank code. These may only be alpha characters. CC is a two-digit country code consisting of alpha characters. LL stands for a two-digit alphanumeric location code. bbb is an optional code of alphanumeric characters that identifies the store or department.

ISBN

(\d{3}-\d{1,5}-\d{1,7}-\d{1,7}-\d

The International Standard Book Number (ISBN) identifies books and other publications such as multimedia products. The ISBN consists of five elements, some of whose length can vary, but it always has a total of 13 digits.

First there is a three-digit prefix. This is followed by the group number, which can contain one to five digits; it stands for the language area. This is followed by the publisher number, which is also variable in length and can be up to seven digits long. This is followed by the title number with up to six digits.

To ensure that the ISBN has a total of 13 digits, the title number can be supplemented with leading zeros. Finally, there is a single-digit check digit.

Email

^[\w!#$%&'*+\-/=?\^_`{|}~]+(\.[\w!#$%&'*+\-/=?\^_`{|}~]+)*@((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$.

The standard field mask for e-mail addresses in DocuWare organizations allows the following characters before the domain extension of an e-mail: Upper and lower case letters, the digits 0-9 as well as special characters from this list: !#$%&'*+-/?_`|~

VAT (Germany)

\d{9}

For German companies, VAT IDs always begin with DE - followed by nine digits.

VAT numbers of other EU countries

[A-Z]{2} [A-Z0-9][A-Z0-9]\d{5}[A-Z0-9]{0,5}

English bank codes

[0-9]{2}-[0-9]{2}-[0-9]{2}

English bank codes have six digits and are divided into groups of two, separated by hyphens.

German bank codes

[0-9]{3} [0-9]{3}[0-9]{2}

German bank codes follow a simple pattern: 3 digits, 3 digits and 2 digits.

German registration plates

([A-ZÖÜÄ]{1,3} [A-Z]{1,2} [1-9]\d{0,3}[H]?)|([A-ZÖÄÜ]{1,3} \d{1,7})

German license plates usually consist of one to three letters followed by one or two letters. At the end there is a one- to four-digit number, whereby the first digit may not be zero: [A-ZÖÜÄ]{1,3}[A-Z]{1,2}[1-9]\d{0,3}[H]? The optional "H" stands for "Historic Vehicles".

Alternatively there are the license plates of the authority vehicles, where one to three letters are directly followed by numbers:[A-ZÖÄÜ]{1,3} \d{1,7}.

International Telephone Number

\+\d{2}\d?-\d{2}\d{0,2}?-\d{3}\d{0,7}

Example: +49-3456-1234567890

German Postal Code

[A-Z][A-Z]?-\d{4}\d?

Example: D-82110

Time

(0?\d|1\d|2[0-3])\:[0-5]\d\:[0-5]\d

Example: 10:15:00

Notes

  • The field mask is not enabled for any storage events that occur automatically and not explicitly via a store dialog. This is the case for example when Connect to Outlook stores documents without opening the store dialog, when documents are copied from the result list into another file cabinet, or when documents are exported using the export workflow.

  • The user can enter values that don't conform to the field mask using the index dialog, unless the same field mask or another is defined for the field in the index dialog. If another one is defined, the original entry cannot be changed. If the same one is defined, another value can be entered in the same way.

  • Please avoid spaces at the start and end of a mask definition. Although a user can enter a suitable index value in the store dialog if the dialog contains spaces, the index term will be stored in the database without the spaces. This has the effect that it will not be possible to edit the index term in the index dialog if the same mask is assigned to the field there. Because the stored term in the database does not satisfy the requirements of the mask definition, it is displayed as read-only.

  • The regular expressions used by field masks must be an exact match. When you have two alternatives where one is an extension of the other, put the longer one first, otherwise it will have no opportunity to be matched.