This method API writes a record to a grid.
Parameter
...
Section |
---|
Column |
---|
| Parameters
- Profound.js data structure reference
|
|
...
If specified, the record will be populated with the values from the data structure. If not specified, global field values are used. |
Column |
---|
| RPG Equivalent
WRITE
|
|
Examples
Code Block |
---|
|
pjs.defineDisplay("display", "subfiled.json", { rrnFields: { sfl: 'RRN' } });
pjs.define("RRN", { type: 'integer' });
display.sfl.clear();
// Write 99 records to the grid
for (RRNvar i = 1; RRNi <= 99; RRNi++) {
// 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 pjs.defineDisplay() statement, then the appropriate RRN
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
...
Video Tutorial
Widget Connector |
---|
width | 640 |
---|
url | https://www.youtube.com/watch?v=xRxtYuMvYhk |
---|
height | 360 |
---|
|