DataRow packet

A DataRow packet is sent by the server to the client for each row in a result set. It contains the values for each column of the row.

The context.packet object is exposed as a JavaScript object. You can retrieve and set values like in any JavaScript object.

The packet object has a special property called rowDescription that contains the metadata for the result set. It is simply a copy of the RowDescription packet that was sent by the server at the beginning of the result set.

The packet object also a special method remove() to indicate that this row should not be returned to the client.


Changing a value based on metadata in a result set filter:

if (context.packet.rowDescription.getFieldByName("salary") != null) {
context.packet.salary = 0.0;

Hiding rows that have certain criteria:

if (context.packet.userName === 'aenewman' && context.packet.state !== 'MN') {