Numbering Tables

This sample code automatically adds row numbers to tables every time the record is saved.

Sample Image


Sample Code

(function() {
    "use strict";

    var NUMBERFIELD = "numbering"; //field code of number field in the table
    var TABLEFIELD = "mytable"; //field code of the table

    var events = [
    ];, function(event) {
        var record = event.record;

        //auto-number the table rows
        var count = record[TABLEFIELD].value.length;
        for (var i = 0; i < count; i++) {
            record.Table.value[i].value[NUMBERFIELD].value = i + 1;

        return event;


Refer to the Tutorial page, on how to add scripts to your app.

Was this article helpful?
0 out of 0 found this helpful
Please sign in to leave a comment.