FetchValue function
Syntax
FetchValue(scrollpath, target_row, [recordname.]fieldname)
where scrollpath is:
[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row, ]] RECORD.target_recname
To prevent ambiguous references, you can also use SCROLL.scrollname, where scrollname is the same as the scroll level’s primary record name.
Description
Use the FetchValue function to return the value of a buffer field in a specific row of a scroll level.
Note:
This function remains for backward compatibility only. Use the Value field class property instead.
This function is generally used to retrieve the values of buffer fields outside the current context; if a buffer field is in the current context, you can reference it directly using a [recordname.]fieldname expression.
Parameters
| Parameter | Description |
|---|---|
|
scrollpath |
A construction that specifies a scroll level in the component buffer. |
|
target_row |
An integer specifying the row on the target scroll level where the referenced buffer field is located. |
|
[recordname.]fieldname |
The name of the field where the value to fetch is located. The field can be on scroll level one, two, or three of the active page. The recordname prefix is required if the call to FetchValue is not on the record definition recordname. |
Returns
Returns the field value as an Any data type.
Example
The following example retrieves the value from field DEPEND_ID in record DEPEND on row &ROW_CNT from scroll level one:
&VAL = FetchValue(SCROLL.DEPEND, &ROW_CNT, DEPEND.DEPEND_ID);
Related Topics
- PeopleCode API Reference: Value property: Field class
- PeopleCode API Reference: LongTranslateValue property: Field class
- PeopleCode API Reference: ShortTranslateValue property: Field class
- PeopleCode Developer’s Guide: Understanding Data Buffer Access
- PeopleCode Developer’s Guide: Specifying Data with References Using Scroll Path Syntax and Dot Notation
- ActiveRowCount function
- CopyRow function
- CurrentRowNumber function
- PriorValue function
- UpdateValue function
- PeopleCode Developer’s Guide: Accessing Secondary Component Buffer Data