Replaces the data in a field if the current data equals a given value.

Example Data Update Functions


lrvtc.updateMessageIfequals ( columnName, rowIndex , value, ifEqualValue );


name Comments
columnName The column to write to.
rowIndex The number of the row. The first row has index 1.
value The value to set the field to.
ifEqualValue The value to compare the current value of the field to.

lrvtc.updateMessageIfequals writes the value to the field specified with the column name and row index if the value of the field when lrvtc.updateMessageIfequals is called is equal to the ifEqualValue. If the ifEqualValue and the field value match, the field value is overwritten.

Return Values

0: If API call was successful but value was not updated.

1: If API call was successful and value was updated.

On call failure, one of the Error Codes.


All string input arguments can be passed using standard parameterization.


    var rc;
    rc =  lrvtc.updateMessageIfequals("P_status", 18, "out of stock","instock");
    lr.logMessage("update_message rc="+ rc);