11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

appears as if <strong>Form</strong> <strong>Builder</strong> adds a space in front of the number. (The minus sign is displayed.)<br />

• To embed additional characters such as a hyphen (-) or a comma (,), surround the character with<br />

double-quotes (").<br />

• Embedded characters are separate from text item values and are not collated along with text item<br />

values, even when the end user enters them.<br />

NUMBER Examples<br />

<strong>Form</strong>at Mask Description<br />

FM099"-"99"-"9999 Displays the social security number as formatted,<br />

including hyphens, even if end user enters only nine<br />

digits.To create a Social Security column, create an 11character<br />

column, set to fixed length, with a format<br />

mask of 099"-"99"-"9999. This mask will<br />

accommodate Social Security numbers that begin with<br />

zero, accepting 012-34-5678 or 012345678 (both<br />

stored as 012345678).<br />

99999PR Accepts -123; reformats as .<br />

999MI Accepts -678; reformats as 678-.<br />

9.999EEEE Displays as 1.00E+20.<br />

How <strong><strong>Form</strong>s</strong> handles length mismatches<br />

If a runtime user enters a numeric string that exceeds the format mask specification, the value will be<br />

rejected. For example:<br />

<strong>Form</strong>at Mask User enters Result<br />

99.9 321.0 Invalid<br />

99.9 21.01 Invalid<br />

99.9 21.1 21.1<br />

99.9 01.1 1.1<br />

In contrast, if a numeric value fetched from the database exceeds the format mask specification for its<br />

display field, the value is displayed, but truncated, with rounding, to fit the mask. (The item itself within<br />

the <strong><strong>Form</strong>s</strong> application retains its full value.) For example, if the database held the value 2.0666, and the<br />

format mask was 99.9, the value displayed to the user would be 2.1. However, the value of the item<br />

within the form would be the full 2.0666.<br />

Dates<br />

The following table describes valid format masks for dates.<br />

Element Description<br />

YYYY or SYYYY 4-digit year; "S" prefixes "BC" date with "-".<br />

3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!