Displaying and validating data

Data validation

Appeon supports data validation in the following two ways:

  • Validating whether the data is of a correct data type and in the allowed data scope

  • User-defined validation expression

The validation expressions must be DataWindow expressions that Appeon supports (see DataWindow operators and expressions section).

Define display format

  • For Web applications, formats specified in the PowerBuilder application has a higher priority than formats specified in the client machine.

  • The format property is supported for column edit style Edit and EditMask. The display formats are listed in the following table:

Table 246. 

Using sections

Supported

Each type of display format can have multiple sections, with each section corresponding to a form of the number, string, date, or time. Only one section is required. On the web, the sections can be no longer than two.

Supported example:

$#,##0;($#,##0) //Supported

Unsupported example:

$#,##0;($#,##0);($#,##0.00) //Unsupported

Number

Supported

Special characters: "#", "0", "%", "$", "E-", "E+", "e-", "e+", "~"

Keywords: [General], [Currency]

Separator: ",", "."

Default format: ###,###.00

Unsupported

lf the currency is not US dollars, it is better to specify the format with the dollar symbol replaced with the actual currency symbol to ensure that the currency symbol displays correctly in the deployed Web application. For example, if the format is ¥#,##0.00, then do not rely on the setting of the client machine to add the actual currency symbol.

String

Supported

Special characters: "d", "dd", "ddd", "dddd", "m", "mm", "mmm", "mmmm", "yy", "yyyy"

Separator: "-", ":", "/", ".", " "(space), ", "

Separator: Chinese characters for year, month or day can be separators

Keywords: [ShortDate], [LongDate]

Default format: mm/dd/yy

Unsupported

None.

Time

Supported

Special characters: "h", "hh", "m", "mm", "s", "ss", "ffffff", "AM/PM", "am/pm", "A/P", "a/p"

Separators: "-", ":", "/", ".", " "(space), ","

Keywords: [Time]

Default format: hh:mm:ss:fff

Unsupported

Chinese characters as AM and PM symbols in the Control Panel | Regional Options are unsupported for Web applications.

DateTime

Supported

Separators: "/", "-" , " " (space)

Default format: mm/dd/yyyy hh:mm:ss:ffff

When setting the date format to mm/dd/yyyy, an invalid date will turn to 01/01/1900 in Appeon while 00/00/0000 in PowerBuilder.

Unsupported

None.