You can specify the field format for a specific section field. This restricts the type of data the field can accept. When you include field formats in DAL statements, place them in quotation marks. The following table lists the available field formats:
Format |
Definition |
Description |
a |
Accepts only alphabetic characters (case sensitive) |
|
A |
Accepts only alphabetic characters and displays uppercase |
|
B |
Accepts characters according to a bar code format string |
|
C |
A custom format string |
|
d |
Accepts date information according to a date format string |
|
i |
Accepts all alphabetic characters, including international characters, and is case sensitive |
|
I |
Accepts all alphabetic characters, including international characters, and converts to uppercase |
|
k |
Accepts all characters, including international characters, and is case sensitive |
|
K |
Accepts all characters, including international characters, and displays uppercase |
|
m |
Accepts an X or a space (used for a check box) |
|
M |
No format |
|
n |
Accepts numbers and uses a numeric format string |
|
s |
Numeric/text |
Accepts numbers or text. If the field value is numeric, then the numeric format will be applied, otherwise the text will be unchanged. For example, with a format of $ZZ9.99, the value 10 would appear as $10.00, but a text value of N/A would appear unchanged by the format. |
t |
Accepts only information selected from a table |
|
T |
Time |
Accepts only time |
x |
Accepts all non-international characters (case sensitive) |
|
X |
Accepts all non-international characters and displays uppercase |
|
y |
Accepts a Y or N (Yes or No) |
* Custom formats are unique formats you create. You specify text to be inserted in an input string and where the text is to be inserted. For example, assume the input string is "123456789" and the custom format string is "3,-,2,-". This format takes the first three characters of the input string and inserts a hyphen(-), then takes the next two characters of the input string and inserts a hyphen (-), then appends the remainder of the input string. The result is: 123-45-6789.
Insertion text can be longer than a single character. Look at these examples:
Input Text |
Format String |
Output |
B105 |
1,97 |
B97105 |
First Street |
6, (not 1st) |
First (not 1st) Street |
© Copyright 2014, Oracle and/or its affiliates. All rights reserved. Legal notices.