This method API writes a record to a grid.
Parameter
...
Section | |||||
---|---|---|---|---|---|
|
...
|
Examples
Code Block | ||
---|---|---|
| ||
pjs.defineDisplay("display", "subfiled.json"); display.sfl.clear(); // Write 99 records to the grid for (var i = 1; i <= 99; i++) { // Logic to populate grid record can go here display.sfl.write(); } display.screen.execute(); |
It is also possible to specify an RRN (Relative Record Number) field on a subfile grid. If this is specified in the the pjs.defineDisplay() statement statement, then the appropriate RRN number be populated before the write() method is executed.
Code Block | ||
---|---|---|
| ||
pjs.defineDisplay("display", "subfiled.json", { rrnFields: { sfl: 'RRN' } }); pjs.define("RRN", { type: 'integer' }); display.sfl.clear(); for (RRN = 1; RRN <= 99; RRN++) { // Logic to populate grid record can go here display.sfl.write(); } display.screen.execute(); |
RPG Equivalent
WRITE
...