GETROWDESC action


Function
Action retrieves the description of specified row or all rows of given structured variable.
Declaration
 GETROWDESC structIdent, rowIdent, descIDent

Parameters
structIdent in Reference to an object of Structured variable type.
rowIdent in Number of a row, which description to be retrieved (Integer).
descIDent out Local variable of Text type or reference to an item of a structured variable of Text type.

Description
If the object specified by the parameter structIdent does not exist, or is not an object of Structured variable type, the action generates the ERR_OBJECT_NFOUND error.

If the parameter rowIDent is different from zero, the action retrieves the description of given row and inserts it into the parameter descIDent.
In case the row has no description defined or the number of row is greater than the number of structured variable rows, the parameter descIdent gets invalid value.

If rowIdent is equal to 0, the action retrieves the descriptions of all rows of specified structured variable. In this case, the parameter descIdent  must be the reference to an local variable item of Text type. Then the action changes the dimension of the local variable to required dimension (the dimension is size is specified by the number of rows of the structure structIdent) and inserts the descriptions into particular column items. For rows with no descriptions, it returns invalid value.


Example
RECORD (SD.RecordDef) _desc
 
 ; Retrieving the description of 1st row of structured variable SV.Structure
 GETROWDESC SV.Structure, 1, _desc^Text
 
 ; Retrieving the descriptions of all rows of structured variable SV.Structure
 GETROWDESC SV.Structure, 0, _desc^Text
 ; the action internally executes the following action: REDIM _desc[SV.Structure\DIM]


Related pages:

Napíšte komentár