Share this page

# lrvtc.increment

Increments a counter stored in a field.

Example | Data Update Functions

## Syntax

    lrvtc.increment ( columnName, rowIndex, incrValue );

## Arguments

name | Comments
--- | ---
columnName | The column name.
rowIndex | The row number. The first row has index 1.
incrValue | The 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);

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: