Click for Index

Section 11
Edit Masks

This table permits you to define edit masks that control what the operator is permitted to enter into the reference_number field during data entry on the LINE ITEM and PROFILE TRANSACTION entry screens.

The tran_code table edit_mask_key field is linked to the same field in this table, and then to the actual edit_mask that is to be used during data entry. If no edit_mask_key is present on the trancodes table, or if the specified edit_mask_key is not found in the edit_masks table, the operator will be able to enter free-form text in the reference_number field. Otherwise, the entry will have to conform to the defined edit mask.

Each field in the table is listed, along with a short description, below:

  1. EDIT_MASK_KEY

    This is the key field that links to a tran_code table record. A single edit_mask_key value can be shared by multiple trancodes if the reference_number edit field requirements are the same for each of the trancodes.

  2. EDIT_MASK_TEXT

    This is the actual edit mask to be used for the reference_number field. Please refer to the information details on setting up the Edit Mask Rules.
  3. In some cases you want to collect certain information about a transaction and ensure that the information is in a prescribed format. For example, you might want to collect an invoice or customer number and it must be a specific number of digits or it must start with 2 alpha characters, then be followed by 4 numeric digits. The EDIT-MASK records permit you to associate an edit mask with a specific transaction to achieve these results.

    These values can apply to a tran code or to the reference_number you will be using for your PROFILE TRANSACTIONS. Depending on which of these options you want to use, the program needs specific information about which edit mask applies.

    The data value must in a specific format to allow the edit mask to work correctly. The edit mask is a series of letters and numbers and special symbols that define what type of prompt appears on the screen for the operator, e.g. , DATE:, and other letters and numbers and other special characters that define the type of data that can be entered in each position. These include, in most cases, numbers. Certain characters have special meaning as edit characters, and in order to get them to appear as a prompt character instead of an editable character, you must precede then with a back slash character (\) so the edit routine knows they are to be displayed instead of edited.

    When you define an edit mask each character position in the mask maps to either a placeholder of a specified type or a literal character. Literal characters, give visual cues about the type of data being used. For example, the parentheses surrounding the area code of a telephone number are literals: (520)-555-1212. The edit mask for this type of entry might look like this:

    PHONE\#:(%%%)-%%%-%%%%.

    If you attempt to enter a character that conflicts with the input mask it prevents you from entering invalid characters into the edit field in that position.

    The following are examples of standard input masks that you might wish to use. The program distinguishes between numeric and alphabetic characters for validation, but cannot check for valid content, such as the correct month or time of day. The input mask can consist of the following characters.
    Mask Character Description
    * Allows entry of any character, including numbers and spaces.
    % Allows entry of numeric characters only (0 to 9).
    # Allows entry of 0-9 and the period and minus sign.
    U or L These two mask characters permit entry of A-Z only. The underlying control uses the L for force only lower case, and the U to force uppercase. However, within the RASWIN program, all data is converted to uppercase. If you wish to use either the U or L character in an edit mask as a literal character, as in the example below, you must precede it with a back-slash character.
    Literal characters All other symbols are displayed as literals; that is, as themselves.
    \ Treat the next character in the mask string as a literal. This allows you to include the *, %, #, U, L, and ? characters in the mask. When preceded by a "\" backslash character these characters are treated as a literal for masking purposes.

    For instance, in the phone number example shown earlier, the edit mask is

    PHONE\#:(%%%)-%%%-%%%%.

    When displayed on the screen for the user to enter the phone number, it would look like this:

    PHONE#:(___)-___-____.


    The edit mask characters # and % are treated as a numeric entry positions, unless it is preceded by the \ character, in which case the # character is displayed as a literal character and its edit mask function is ignored. The difference between the two is that the # character allows entry of 0 to 9 AND the decimal point and "-" sign whereas the % character permits only the numbers 0 to 9.

    Here's another example. Suppose you needed an edit mask where you wanted to have a prompt on the screen for the user that displays: WATER UNIT:_________________ LICENSE#:____.


    Note that the letters in the prompt (U,L, and #) are edit mask characters. So to get this to display correctly, you'll need an edit mask that looks like this:

    WATER \UNIT:***************** \LICENSE\#:%%%%.

    You'd have to use the \ in front of the U, L, and # sign characters as shown, because they are edit mask characters and you want them to display as actual values. The area for the "water unit" filled with * signs because your user will need to enter an alpha numeric value, that could include letters, numbers, or spaces.