XFA Specification
Chapter 24, Picture Clause Specification
Picture Clause Reference
931
Examples of Output Formatting
Consider the following examples of output formatting with text picture clauses. Results have been quoted,
so that one can see where spaces would appear in the formatted value. The quotes are not actually part of
the result.
Picture clause
A9A 9A9
'+1 ('999') '999-9999
999.999.9999
Input value
K1S5K2
6135551212
6135551212
Formatted result
"K1S 5K2"
"+1 (613) 555-1212"
"613.555.1212"
Examples of Input Parsing
In the next example involving input parsing with text picture clauses, we have serial number data that
requires the input to be of the form: three alphabetic characters, followed by four digits, followed by a
single character of any type. A suitable text picture clause would therefore be:
AAA-9999-X
and if we apply this picture clause as an input mask against the following input.
Picture clause
AAA-9999-X
Input value
ABC-1234-5
ABC-1234-D
123-4567-8
a
Formatted result
"ABC12345"
"ABC1234D"
""
(the result is a zero-length string)
a.Note that the input data 123-4567-8 did not satisfy the input mask, and the resulting parsed value was an empty
string.
Null-Category Picture Clauses
Null-category picture clauses specify output formatting for null values associated with non-image content
types. They are always expressed with the "
null
" category designator and may use any of the symbols
defined for numeric picture clauses.
null{numeric
picture clause symbols}
See also
“Compound Picture Clauses” on page 907
and
“Numeric Pictures” on page 926.
Null-category picture clauses are typically used in alternate picture clause expressions, such as the
following:
null{’n/a’} | num{$z,zz9.99}
See also
“Alternate Picture Clauses” on page 909.
Home Index Bookmark Pages
Pages: Home Index All Pages