Kbase P47724: How to preserve field format when converting to string?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/13/2003 |
|
Status: Unverified
GOAL:
How to preserve field format when converting to string?
FACT(s) (Environment):
Progress 9.x
FIX:
To preserve the format for a field (as defined in the Data Dictionary) when converting the field to a string, use code similar to the following:
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
DEFINE VARIABLE hField AS HANDLE NO-UNDO.
FIND FIRST Customer NO-LOCK.
MESSAGE STRING(Customer.Balance) VIEW-AS ALERT-BOX.
ASSIGN hBuffer = BUFFER Customer:HANDLE
hField = hBuffer:BUFFER-FIELD("Balance").
MESSAGE hField:STRING-VALUE VIEW-AS ALERT-BOX.