Display Settings PropertiesDisplay Format

Description

If the control type is Label, Link, TextBox, or TextArea, the Display Format property allows you to automatically change the presentation of your data.

Discussion

The Display format is used to transform the value in the field before it is shown to the user. The transformation occurs on the server before data is sent to the client.

The Display format is often used to format data such as dates, currency values, convert a character value to uppercase, etc. If the field is an RTF Memo, contains HTML markup, or image data, Special Formats can be used to format the value so it displays properly.

The format can reference the current value in the field using the <value> placeholder. For example, the expression below will convert the first character in the field to upper case and leave the rest of the string unformatted:

f_upper(<value>)

Pre-defined Formats

Several pre-defined formats are available for the most common formats. A pre-defined format can be selected using one of the two buttons in the Display Format dialog -- Select Pre-Defined Format and Special Formats. Depending on the data type of the field, the pre-defined formats available will vary.

images/predefinedFormatsC.png
Pre-defined formats for Character fields
images/predefinedFormatsD.png
Pre-defined formats for Date fields
images/specialformats1.png
Special Formats are built-in for Memo field and images
There are no predefined display formats for short time (Y) fields. However, you can write your own.
If the control type is "TextBox" and the field type is "Date", then a Date Picker will appear. You must set the date picker format to use the same style.

International Currency Format

The International Currency Format button opens a dialog that can be used to build a format for currency for countries throughout the world. The currency code is pre-defined for a variety of countries. Select the desired country from the dropdown list, use the text boxes to specify the decimal places, thousands separator, etc and click OK to insert the format into the Display Format dialog.

images/internationalCurrency1.png

Default Time Display Format

When you add a Date/time field (Time field), the default server side Display Format is set to the following:

time("{grid.clientSideDateFormat} 0h:0m 0s am",<value>)

In Alpha Anywhere 4.5.4.8 and prior, the time format was set to time("{grid.clientSideDateFormat}",<value>). This resulted in the time portion being stripped from the date/time value.