Patterns
You can perform formatting of output of fields at runtime by using patterns.
There are patterns for date formats, patterns for omitting leading zeros, and so on.
There are four different types of patterns:
Display pattern:
The display pattern describes how data at runtime will be displayed in the document.
A set of rules-based specifications governs the formatting and parsing of date, time, numeric data, and text data.
Example: The current date (which in ABAP has the format YYYYMMDD, for example, 20101215) can be displayed as “2010-12-15” or “Sunday, December 15, 2010”:
Edit pattern:
Edit patterns are used for interactive forms only. They describe the syntax for entering data into a date field, numeric field, or text field.
Validation pattern:
The validation pattern is used to validate the user input at runtime. You can validate a special range of values using scripting.
Data pattern:
The data pattern describes how the data should be read. In other words, it describes the syntax of bound or saved data. As all date/time fields coming from the context are automatically parsed correctly, you should not manually set this pattern.
The following lists show some relevant pattern symbols. For a full list, consult the Adobe LiveCycle Designer online manual.
The example above shows the use of the pattern 99'-'99.
You can use special settings for numeric fields to guide the user input.
For example, see the possible settings for the “Comb of n characters” field. This setting displays a grid and makes the user interface easier to understand.
In some parts of the documentation, display patterns are also called picture clauses (this term reminds developers of the COBOL programming language).
Display patterns are optional and should be used only when necessary.
If you do not use them, a standard format will be used based on the locale (the combination of language and country).
You specify a display pattern on the Field tab of the Object palette. The dropdown list lets you select from some typical display patterns, but you are free to type in your own.