Field Formats

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

Alphabetic

Accepts only alphabetic characters (case sensitive)

A

Uppercase Alphabetic

Accepts only alphabetic characters and displays uppercase

B

Bar code

Accepts characters according to a bar code format string

C

End

A custom format string

d

Date

Accepts date information according to a date format string

i

International Alphabetic

Accepts all alphabetic characters, including international characters, and is case sensitive

I

International Uppercase Alphabetic

Accepts all alphabetic characters, including international characters, and converts to uppercase

k

International Alphanumeric

Accepts all characters, including international characters, and is case sensitive

K

International Uppercase Alphanumeric

Accepts all characters, including international characters, and displays uppercase

m

X or space

Accepts an X or a space (used for a check box)

M

Multiline text

No format

n

Numeric

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

Table only

Accepts only information selected from a table

T

Time

Accepts only time

x

Alphanumeric

Accepts all non-international characters (case sensitive)

X

Uppercase Alphanumeric

Accepts all non-international characters and displays uppercase

y

Y or N

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

See Also