Was this helpful?
Using Global Constants
You can define a specific value as a global constant to use at various points throughout an application. You then can use that constant by itself or as part of a 4GL expression in any of these ways:
To assign values to fields in Append frames
To specify query restrictions for Browse and Update frames
In a parameter that you pass between frames
In 4GL escape code
Global constants are convenient for values that can change over the lifetime of an application. For example, you might need to include a value for a sales tax on several frames. Define a constant called "sales_tax" and set its value to the current tax rate.
If the tax rate changes, you need to reset the value for only the single constant you have defined. The next time you run the application, Vision applies the new value for "sales_tax" wherever it appears.
You can define constants as character strings or numerical values. For example, you can have a message that appears on various frames. By defining the text of the message as a constant, you can easily change the message throughout the application.
Last modified date: 04/03/2024