Share this page

# lrvtc_update_message_ifequals

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

## C Language

    VTCERR2 lrvtc_update_message_ifequals ( char *columnName, int rowIndex , char *value, char *ifEqualValue );

## C# Language

    void vts.update_message_ifequals ( string columnName, int rowIndex , string value, string ifEqualValue );

## Java Language

    intLrvtc.update_message_ifequals ( string columnName, int rowIndex , string value, string ifEqualValue );

Data Update Functions

## Arguments

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_update_message_ifequals writes the value to the field specified with the column name and row index if the value of the field when lrvtc_update_message_ifequals is called is equal to the ifEqualValue. If the ifEqualValue and the field value match, the field value is overwritten.

## Return Values

C Language:

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.

C# Language: No return value.

Java Language:

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.

## Parameterization

All string input arguments can be passed using standard parameterization.

## C Language Example

        int rc;
        ....
        rc =  lrvtc_update_message_ifequals("P_status", 18, "out of stock","instock");
        lr_log_message("update_message rc=%d\n", rc);

## C# Language Example

.Net Single Connection Example

## Java Language Example

Java Single Connection Example

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: