Consultor Eletrônico



Kbase P19585: How to retrieve the field values from a SmartDataObject using the ADM2
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/15/2008
Status: Verified

GOAL:

How to retrieve the field values from a SmartDataObject using the ADM2

GOAL:

How to retrieve the field values for the selected record in a SmartDataBrowser

GOAL:

How to use the columnStringValue, colValues and colStringValues functions for a SmartDataObject

FACT(s) (Environment):

Progress 9.x

FIX:

The field values for a selected record should be retrieved from the SmartDataObject using the following functions:

columnStringValue:
This function should be used for retrieve one field value as the following example shows:

DEFINE VARIABLE cValue AS CHARACTER NO-UNDO.

cValue = DYNAMIC-FUNCTION('columnStringValue':U IN <SDO-handle>, INPUT '<field-name>).


colValues:
Returns a CHR(1) delimited list of values for the requested columns of the current row of the RowObject.
The first value is the RowObject ROWID and RowIdent separated with a comma.

DEFINE VARIABLE cValue AS CHARACTER NO-UNDO.

DYNAMIC-FUNCTION('colValues':U IN <SDO-Handle>, INPUT 'custnum,name').


colStringValues:
Returns a delimited list of values for the requested columns of the current row of the RowObject.

Parameters:
INPUT pcColumnList - Comma delimited list of RowObject column names
INPUT pcFormatOption - Format of returned values
- Blank or ?
No formatting, just buffer values
- 'Formatted'
Formatted according to the columnFormat with right
justified numeric values.
- 'TrimNumeric'
Formatted according to the columnFormat with LEFT
justified numeric values.

INPUT pcDelimiter - optional delimiter (default CHR(1)).

This function is different from colValues in that it does NOT return rowidents as the first entry and does not look in the dataSource.

DEFINE VARIABLE cValue AS CHARACTER NO-UNDO.

DYNAMIC-FUNCTION('colStringValues':U IN <SDO-handle>, INPUT 'custnum,name', "", "").