Field Display Formats

You can customize the way that Laserfiche displays date, time and number field values. This customizing can be done on a field-by-field basis. For example, you might choose to always display one number field as a percentage (so that the value "90" will be displayed as "90%"), and a different number field as currency (so that the value "345.98" will be displayed as "$345.98").

Laserfiche provides several default field displays:

  • Number field: General, Percent, Scientific (scientific notation), and Currency (select the specific currency you want to display from the list)
  • Date field: Long date, Short date.
  • Time field: Long time, Short time.
  • Date/Time field: Long date/time, Short date/time.

Note: Long and short date and time display will match the locale settings of your browser.

You can also create a custom field display format.The syntax depends on whether you are working with a number field, or a date or time field.

Custom Number Field Display

A number pattern is a string of characters that consists of some combination of literal characters and symbols. A literal character is a character that will be displayed as you type it in the field format; a symbol will be replaced by the value or values it represents. The pattern determined by the combination of these will control how numbers are displayed in that field. In some cases, a symbol might indicate that a particular operation will be performed on the value for display purposes.

The table below lists the possible elements of a number pattern and the symbol used to represent them in the pattern. Examples are provided below the table.

Custom Number Field Display Format Syntax Elements
Description Symbol
Digit 0
Rounding increment 1-9
Significant digit @
Digit, zero shown as absent #
Decimal separator or monetary decimal separator .
Minus sign -
Grouping separator ,
Separator between mantissa and exponent in scientific notation E
Prefix positive exponents with a localized plus sign +
Separator between positive and negative sub-patterns ;
Multiply by 100 and show as percentage %
Multiply by 1000 and show as per mille
Currency sign, replaced by currency symbol ¤
Currency sign, replaced by international currency symbol ¤¤
Currency sign, replaced by currency plural names (e.g., "US dollars") ¤¤¤
Quote special characters in prefix or suffic '
Pad character indicator *

Examples

Custom Number Field Display Format Examples
Pattern User Input Display Value Notes
#,###,##0.0# 1234567.8 1,234,567.8 The character used to separate groups of digits depends on your local settings.  In some regions, a comma is used, as in the display value in this example, but in other regions another character (such as a period) might be used.
#,###,##0.0# -1234567.8 -1234,567.8 This pattern is identical to the above. If no special formatting is indicated for negative numbers, the same formatting as for positive numbers will be used, prepended with a minus sign.
###,##0.0;'('-###,##0.0')' 1234.5 1,234.5 If you want to display positive and negative numbers differently beyond simply adding a minus sign, you can separate a positive and negative pattern with a semicolon. This pattern contains both a positive and negative subpattern, and this example of user input demonstrates the handling for positive numbers, specified by the pattern before the ";" symbol.
###,##0.0;'('-###,##0.0')' -1234.5 (-1,234.5) As with the above example, this pattern specifies both a positive and negative display pattern. This example of user input demonstrates the handling for negative numbers, specified by the pattern after the ";" symbol. In this case, negative numbers are indicated by a minus sign before the value, and are contained within parentheses.
#1,000 1234567.8 1,234,570 The "100" preceding the final 0 in the string indicates that the value should be rounded to the nearest hundreds place. Note that the actual value set has not been lost; the server is still storing the entire value down to the tenth place. The rounded value is for display purposes only.
###,##0' kph' 55.5 55.5 kph The value in single quotes is a suffix. It is printed as-is and is not parsed, but provides additional information about the value (in this case, indicates that it is a speed in kilometers per hour).
#,###,###,###0.00 ¤¤¤ 1159.9 1,159.90 US Dollars The ¤ symbol written three times in a row indicates that the currency type should be written out in full.
*0#####0.0 1234.5 0012345.6 The "*0" string at the beginning of the pattern indicates that the character 0 should be used as a padding character if the input value is shorter than the number of digits specified. Since the pattern specifies six digits before the decimal point, two 0 characters are prepended to the string for display. This allows you to maintain consistent display lengths even for input numbers of varying lengths.
@@@ 1234.5 1230 The @ character indicates the number of significant digits to display. In this example, exactly three significant digits should be displayed. The entire number is saved on the server, but only the specified significant digits will be visible to users browsing the repository.
@@## 1234.5 1234 Combining the @ and # characters allows you to set a maximum and minimum number of significant digits to display. In this example and the next, a value will be displayed with no fewer than two or more than four significant digits. The input string for this example contains five digits, so the fifth is not displayed.
@@## 1 1.0 As in the above example, this pattern indicates that no fewer than two or more than four significant digits should be displayed. Thus, the value "1" will be displayed with two significant digits, as "1.0".
0.###E0 1234.5 1.234E3 Scientific notation is a way of expressing numbers as a combination of a mantissa (the significant digits of the number) and an exponent. This example displays a number in scientific notation with four significant digits.

Custom Date and Time Field Display

A date or time pattern is a string of characters that will be replaced by the actual date and time value input in a field. The pattern determines what date or time information will be displayed, and how it will be displayed. Since the default date and time display options use the client computer settings, you can use a custom date, time or date/time field if you want to display dates and times consistently between client computers. You can also use them to display information not contained within the default date and time fields, such as the quarter or era.

The table below lists all of the possible elements of a date or time pattern, the symbol used to represent them, and an example of how the final value would be displayed. In some cases, the same element may have several different display options.  For example, the symbol y is used for the year, but you can control whether to display all four digits, such as "1999" (in which case you would use the pattern "y" or "yyyy"), or to display just the last two digits, such as "99" (in which case you would use the pattern "yy").

"Stand Alone" values refer to those designed to stand on their own, as opposed to being with other formatted values. if you want to store the current quarter alone, as “2nd quarter”, you would use the stand alone format (QQQQ), whereas “2nd quarter 2007” would use the regular format (qqqq yyyy). In some locales the “Stand Alone” outputs might differ from those of their regular symbol counterparts.

Custom Date and Time Field Display Format Syntax Elements
Description Symbol Example
Era Designator G AD
Year (full) y or yyyy 1998
Year (abbreviated) yy 98
Year for "Week of Year" Y 1999
Quarter (numeric) Q or QQ 02
Quarter (abbreviated) QQQ Q2
Quarter (full) QQQQ 2nd Quarter
Stand Alone Quarter (numeric) q or qq 02
Stand Alone Quarter (abbreviated) qqq Q2
Stand Alone Quarter (full) qqqq 2nd Quarter
Month (numeric) M or MM 09
Month (abbreviated) MMM Sept
Month (full) MMMM September
Month (initial) MMMMM S
Stand Alone Month (numeric) L or LL 09
Stand Alone Month (abbreviated) LLL Sept
Stand Alone Month (full) LLLL September
Stand Alone Month (initial) LLLLL S
Week of Year w 182
Week of Month W 2
Day of Month d 5
Day of Month (two-digit) dd 05
Day of Year D 205
Day of Week in Month (e.g., 2nd Wed. in July) f 2
Modified Julian Day Number g 2451334
Day of Week (abbreviated) E, EE or EEE Tues
Day of Week (full) EEEE Tuesday
Day of Week (initial) EEEEE T
Local Day of Week (if Mon. is 1, Tue. is 2, etc) e 3
Stand Alone Local Day of Week c 3
AM/PM marker a AM
Hours in AM or PM (1-12) h 7
Hours in AM or PM (1-12) (two-digit) hh 07
Hours in AM or PM (0-11) K 5
Hours in AM or PM (0-11) (two-digit) KK 05
Hours in Day (0-23) H 8
Hours in Day (0-23) (two-digit) HH 08
Hours in Day (1-24) k 20
Hours in Day (1-24) (two-digit) kk 20
Minute in Hour m 3
Minute in Hour (two-digit) mm 03
Second in Hour s 9
Second in Hour (two-digit) ss 09
Single Quote '' '

Letters may be included in the pattern, but they must be enclosed in single quotes. For example, the pattern "qqqq 'of' yyyy" would be returned as "2nd Quarter of 2009". Other characters besides single quotes and letters may be included as-is, without needing to be enclosed. For example, the pattern "hh:mm:ss" would return "09:15:45".

Examples

Custom Date and Time Field Display Format Examples
Pattern Result
yyyy-MM-dd hh:mm:ss a 2009-02-19 04:31:16 PM
EEE, MMM d, ''yy Wed, Feb 19, '09
qqqq 'of' yyyy 1st Quarter of 2009
h:mm a 4:31 PM