Kbase P25365: How to save special characters of a browse column format def
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/21/2003 |
|
Status: Unverified
GOAL:
How to save special characters of a browse column format defined on the fly for a field that is defined as character in the database?
FACT(s) (Environment):
Progress 9.x
FIX:
When programmatically changing the format of a character field that is displayed on a browse widget, Progress does not save the special characters that are part of the new format, which is expected behavior. For example:
- "char-field" is the name of a field defined as character - "x(20)" - in the database.
- "99.9" is the new format assigned to "char-field" at runtime (for instance, ASSIGN char-field:FORMAT IN BROWSE {&BROWSE-NAME} = "99.9").
- "777" is the value that Progress stores into the database when the application user types "77.7" on the screen.
In order to save the period, in this example, from the runtime format into the database, code such as the following needs to be generated:
ASSIGN
db-name.char-field = SUBSTRING(char-field:SCREEN-VALUE IN BROWSE {&BROWSE-NAME},1,2) + "." + SUBSTRING(char-field:SCREEN-VALUE,3).