4D v13.4

Formats and Filters editor

Home

 
4D v13.4
Formats and Filters editor

Formats and Filters editor  


 

You most often create filters and formats in pairs — one for the entry filter and the other for the display format.

To create a custom format or filter:

  1. Select Tool Box > Filters and Formats in the Design menu of 4D.
    OR
    In the Property List, click on the [...] button to the right of the Entry Filter selection pop-up menu.
    The Filters page of the tool box appears (empty by default).
  2. Click the add button or choose the Add command in the context menu of the list (right-click in the list area).
    A new item, named “FilterX” by default, is added to the list.
  3. Type the format or filter name. You can edit this name subsequently by pressing the Alt (Windows) or Option (Mac OS) key and clicking the name of the format or filter you want to change.
    You can use up to 255 characters of any type for the name of a format or filter.

    Note: You can include the word “filter” or “format” in the name to indicate its purpose.
  4. Enter the code of the display format or entry filter in the definition area.

    • For example, if you wanted to create a format for a local telephone number, you would use the following:
      ###-####
    • Or, for another example, if you wanted to create a Part Number entry filter for a part number with the format XA-654-1, you would use the following filter:
      !X&"A-Z"##-!0&"0-9"###-#
      and the corresponding display format is “##-###-#.”
    For more information about creating display formats and entry filters, refer to Filter and format codes.
    Note:
    It is possible to fill in this area by double-clicking in the documentation areas of the lower part of the window. For more information about the example areas, refer to the “Using the example areas” section below.
  5.  you want to create another format or filter, click on the add button or select the Add command from the context menu of the list area (right-click).
    OR
    If you want to create a new item based on an existing format or filter, select it and use the Duplicate command of the list area context menu or options menu.

You can edit any filter or format by selecting it and changing the name or the code. You can delete any style by selecting it and clicking on the delete button or by selecting the Delete command in the context menu of the editor.

Any custom formats or filters that you have created using the Filters and Formats editor of the tool box are automatically added to the beginning of the alpha and number format lists, preceded by a vertical bar (|) (see Data entry controls and assistance and GET LIST ITEM PARAMETER). You can choose a custom format just as you would choose a built-in format.

You use the test area to check the operation of the custom filter/format. 

First, you must designate the type of data to which the filter/format will be applied (Alpha, Numeric, Date or Time) using the associated menu.

Once this parameter has been set, enter a test value in the associated area:

  • For entry filters, the operation of the filter is checked during data entry,
  • For display formats, press the Enter or Carriage return key after entering the data. The result of applying the display format appears under the entry area:

The “Documentation for Entry Filters” and “Documentation for Display Formats” areas of the filters and formats editing window consist of a menu and a display area. 

The menu allows setting a theme for which you wish to obtain information or examples. When a theme is selected, corresponding characters and information appear in the display area:

You can double-click an example to insert it directly in the Definition area. 

Entry filters:

  • Display Characters Initiators: Modification of placeholders
  • Initiators: Filter character initiators
  • Starting Codes: Filter start codes
  • Shorthands: Filter shortcuts
  • Placeholders: Characters used to set possible locations
  • Main Dead Characters: Characters ignored in filters
  • Date Entry Filter Examples
  • Time Entry Filter Examples
  • Telephone Entry Filter Examples
  • Social Security Number Entry Filter Example
  • Other Entry Filter Examples

Display formats:

  • Placeholders: Characters used to set possible locations
  • Main Dead Characters: Characters ignored in filters
  • Date Display Format Examples
  • Time Display Format Examples
  • Telephone Display Format Examples
  • Social Security Number Display Format Example

 
PROPERTIES 

Product: 4D
Theme: Filters and formats