lrvtc.increment

Increments a counter stored in a field.

ExampleData Update Functions

Syntax

lrvtc.increment ( columnName, rowIndex, incrValue );

Arguments

nameComments
columnNameThe column name.
rowIndexThe row number. The first row has index 1.
incrValueThe amount to change the field value by. If incValue is negative, it is subtracted from the field value.

lrvtc.increment changes the value in the field by the amount passed in argument incrValue.

If the cell value cannot be converted to an integer or if there is no data in the cell, the cell value after the vtc_increment call is the incrValue argument value.

Return Values

The new value of the field.

Parameterization

All string input arguments can be passed using standard parameterization.

Example

    var newcredit = 0;
    ...
    newcredit = lrvtc.increment("C_credit", 1, 10);
    lr.logMessage("New credit="+ newcredit);