Skip to content

Each

Executes given callback for every row in data table.

1
myDataTable.Each(fn: (row: DataRow) => void):DataTable

Executes given callback for every row in data table.

1
myDataTable.Each(fn: (row: DataRow, i: number) => void):DataTable

Parameters

(row: DataRow) => void fn
    Function to call for every data row.

Remarks

If callback is null, error is thrown.

Scan all rows

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var table = $Database.Get({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Each(function () {
    var id = this.Id;
});

If callback is null, error is thrown.

See Also