TC.vtcIncrement
Increments a counter stored in a field.
Equivalent method in VuGen: lrvtc_increment
TC.vtcIncrement(colName, rowIndex, value, vtsName);
Arguments
Name | Description |
---|---|
colName | (string) The name of the column. |
rowIndex | (integer) The index number of the field. 1 is the first field in the column. |
value | (integer) The value. |
vtsName (Optional) | (string) The alias of the VTS server. |
General information
This function performs as described in these situations:
Situation | Solution |
---|---|
The column name specified in the argument does not exist. | The column is created and the cell referenced by the index is set to the argument value. |
The index specified in the argument exceeds the column size. | The cell is created by the specified index, and the cell contents are set to the argument value. |
The column referenced by the index contains a string. | The cell contents are replaced with the value argument. |
The column referenced by the index contains an integer. | The value is incremented to the new integer. |
Return value
A promise that is fulfilled with 0 if completed successfully.
Example
(async ()=>{
let ret = await TC.vtcIncrement("MyColumn1", 1, 1);
})();