Fields

Problem Summary: Data is displayed
Pattern Key: FIELD
Example: See embedded Examples.
Use When: All fields
Solution:
  1. Do not display internal codes (especially system-generated Guids) to the customer.
    Examples: If 0 represents no selection, display something like "(None)," not "0." If 1-99999 represents a range of values starting at 1 with no maximum, display "1-", not "1-99999." Even if there is a physical limit to the maximum value, the customer only sees a value if he/she specified the value.
  2. Currency values are displayed in a fixed-width font with the proper number of decimal places for the currency (e.g. 2 places for US dollars), right aligned, and with no currency symbol. However, the abbreviation for the currency in use (e.g. USD) is displayed somewhere on every page that has currency values. If a page displays values in multiple currencies, then the currency for each value must be unambiguous.
  3. Dates and times are displayed according to the conventions of the locale.
  4. If the customer cannot enter a time, no time should be displayed. (Do not display midnight in this case.)
  5. Recommended: Display the day of the week only when it is helpful and there is space.
  6. Recommended: Display the month as a word (e.g. January) only when some formality is called for (i.e. in a printed letter) and there is space.
  7. Numeric values (including currency values) are displayed in a fixed-width font and right aligned. Note that alignment should be with other values, not with the right edge of the panel.
    Recommended:  Try to avoid different numbers of decimal places in the same column, or align to the decimal point.
    Exception:  ID numbers (such as zip codes, phone numbers, part numbers, SSN, and the like) are left aligned, even when they are entirely numeric.
    Examples:   Fields - Example - Currency alignment.png
  8. For numeric values where the number of places varies (e.g. quantities, which could be pounds, ounces, gallons, each, etc.) trailing zeros after the decimal place will be removed. For example, 3.00 shirts will be changed to 3 shirts.
    Rationale:  This may cause misalignment, but it is not that important because it will rarely happen and is not all that confusing. Nobody is going to be scanning the column or trying to add 3 shirts to 2.5 pounds of nails, so alignment is not all that important in this case.
  9. Display fields in the order they are usually displayed and in the order they normally occur.
    Example: On order forms, invoices, and throughout the system, the number of items precedes the unit of measure, so the user sees 1 Box, not Box 1.
  10. Omit labels and put several fields on a line when it is natural to do so and the meaning is clear.
    Example: 1 Box, not
       Quantity   1
       Unit   Box
  11. Recommended: Controls that are not available (because of other parameter choices, security, roles, etc.) are shown disabled (gray).
    Alternate: They may be hidden instead if a case can be made that the page would be too confusing or cluttered, taking into account the sophistication and training level of the user, and the likelihood that someone for whom controls are disabled or hidden would need those controls.
    Exception: Surf-to-Edit controls are hidden from those not authorized to use them.
  12. When a page is first displayed, the cursor is placed in the field where the customer is most likely to want to enter data, usually the first field on the page.
Rationale: See embedded Rationale notes.
Accessibility: See Accessibility
Internationalization: See Internationalization
Supporting Examples: None
Where Used: Many places

Items of Note: None

Put to Use

Code Base Solution:

Status: Created

Adherence Rating: Required

Used in Conjunction with: NA

Related Patterns: Field Label

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Minor comments

1. In b/h, we'll align currency right and use a fixed width font, not align to the decimal point,. Aligning to the decimal point is too complicated and actually doesn't look as good. As long as a fixed width font is used and the right number of decimal places is shown, it will look right.

2. In e, I'm not so sure about that. The time is probably relevant as often as not.

Both addressed

Thanks.

This feels like a catch-all

12 parts? Ranging from internal codes to cursor position?

I certainly don't want to make more work than necessary, but it seems like many of these should be patterns of their own and are getting too little attention in this format.

Take time for example. All that is said here is:
"If the customer cannot enter a time, no time should be displayed. (Do not display midnight in this case.) "

But one could say a whole lot more on displaying time and on data entry controls for time. In fact, time (or date time) has its own data input control in Smart Control etc. It seems it deserves more attention.

The same could be said for Currency, Numeric, Ranges, etc. and, in fact, I think some of these do exist as patterns of their own elsewhere.

It is actually more of a parent pattern

There are already two existing patterns for entering Date type data. But I do agree that Time type data warrants another topic.

I'd recommend listing all appropriate patterns under Related Patterns in the Put to Use area.