APPLICATION DESIGN


Creating aliases for choices in a list
You can create aliases for choices, so that if the word itself changes, any formula referencing the field still works. You can also create short aliases for long words to keep formulas more concise. Aliases are also useful if your application is to be translated, since only the choices themselves need to be translated and formulas don't need to be rewritten. Enter the alias using | (a vertical bar) followed by the alias. For example, A is the alias for All in this entry:

All | A

If you use aliases, the leftmost name is displayed in the document, but the rightmost name is stored internally.

Converting aliases to full category names

If you are creating a view with a categorized column that refers to choice list fields, you need to be aware that the view will use the alias name as the category rather than the value that users see in documents.

For example, a field named RequestType contains the following choices:

Hardware Request | HW

Software Request | SW

Service Request | SVC

In a categorized view, the categories display as:

HW

SW

SVC

This can be confusing to users. To display the full names as category names, you must use a hidden field or column formula that converts the aliases back to their full names. For example, the following is a column formula for the view to convert the alias back to their full names for display in the categorized column:

@If(RequestType="HW";"Hardware Request";RequestType="SW"; "Software Request";"Service Request");

Example: Using aliases for choices in a list

You want Service Repair Requests to have a field for product groups. Create an editable dialog list field called Product and on the Control tab, select "Enter choices (one per line)." Include aliases, so that if the product groups change, any formula referencing the alias still works. Enter this list:

Microwaves | 1

Ovens | 2

Refrigerators | 3

Specialty Items | 4

Toasters | 5

Columns that refer to list fields use the alias names in the view, not the word seen by users in the document. To display the contents of the Product field in a view, you need to use a hidden field or column formula that converts the alias name to its long form:

@If(Product="1";"Microwaves";Product="2";"Ovens";Product="3";"Refrigerators";Product="4";"Specialty Items";Product="5";"Toasters";Product="";"";"");

See Also