GML::LOAD - Load Variables from GML_TPL$ Template

Syntax

CALL "GML::LOAD"

Description

This procedure loads variables from the GML_TPL$ template into the appropriate GML variables and corresponding locations. The GML_TPL$ template variable GML_TPL.ROW_N% is used to designate which row of data to load. This procedure does not redraw the grid. Subsequent to loading all data, the REFRESH procedure is used to cause the grid to be redrawn.

This procedure is identical to Put Variables from GML_TPL$ Template.

Example

Loading a three column grid with data from a file. The grid is a member of grid set two. The file key associated with each record read is being stored in the GML_TPL$.REL[c] field. After the file is closed, the REFRESH procedure redraws the grid.

2300 DIM ITEM$:"NUM:C(6),DESC:C(30),PRICE:N(10)"

2400 GML.SET%=2
2410 CALL "GML::TPL_PREP"
2420 ROW%=0

2500 READ RECORD(4,END=2590)ITEM$
2510 ROW%=ROW%+1
2520 GML_TPL.COL$[1]=ITEM.NUM$
2530 GML_TPL.COL$[2]=ITEM.DESC$
2540 GML_TPL.COL$[3]=STR(ITEM.PRICE:"#,###,##0.00")
2550 GML_TPL.REL$[1]=KEYP(4)
2560 GML_TPL.ROW_N%=ROW%
2570 CALL "GML::LOAD"
2580 GOTO 2500
2590 CLOSE (4)

2600 CALL "GML::TPL_PREP"
2610 CALL "GML::REFRESH"

See Also

Visual PRO/5 Grid Management Library

Alphabetical Listing of GML Procedures