Changing labels and formats
- Last Updated: October 18, 2024
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Changing labels and formats
The default label for the Order Number field
is Order Num (you define default labels in
the Data Dictionary when you set up your database), and you might
prefer that it just say Order. Also, the
default display format for the ShipDate field
is different from the format for the OrderDate field:
one has a four-digit year and the other a two-digit year. You can
change labels and default formats in your DISPLAY statement.
If you add the LABEL keyword or the FORMAT keyword
after the field name, followed by a string for the value you'd prefer, then
the display changes accordingly.
To make such changes to your test procedure, change the OrderNum LABEL to Order and
the ShipDate FORMAT to 99/99/99.
In the following example, each field has its own line in the code block, to make the code easier to read, and to emphasize that this style of coding does not change how the procedure works. Everything up to the period is one ABL statement:
|
To view the results of these changes, run your test procedure again:
