Fetchvalue Peoplecode
FetchValue() = FetchValue returns the value of a buffer field in a specific row of a scroll level.
Using fetchvalue in scroll area level when code at fieldchange of record.field in scroll area
Code at fieldchange of record.filed in scroll area or grid at level 1
&companycode = FetchValue(Table_Nmae.COMPANY_ID);
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 levels 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.
Definition
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.