Share this page

# vtc.retrieveMessages1

Pops the first fields from specified columns.

## Syntax

    vtc.retrieveMessages1 ( columnNames, delimiter );

Query Functions

## Arguments

name | Comments
--- | ---
columnNames | The names of the columns to retrieve. The column names are separated by the delimiter.
delimiter | The character that separates the column names and values in the lists. If a string, rather than a single character, is passed in delimiter, the string as a whole is the delimiter.

vtc.retrieveMessages1 retrieves the values from the fields in the top row of the specified columns. The values are stored in parameters, each with the same name as the column the data is from.

All fields in the columns below the first row move up one row. For example, after the call, the values that were in the second row in the columns are in the first row, the values that were in the third row are in the second row, and so on. The last field in each of the columns is cleared. Fields in columns not specified n the columnNames argument are not moved or changed.

## Return Values

Returns zero on success or one of the Error Codes.

## Parameterization

All string input arguments can be passed using standard parameterization.

## Example

    function callback(){
        var name = 'x' + arguments.callee.caller.arguments.callee.caller;
        lr.message( name.match(',(.*)_wrapper')[1] + '\'s callback arg:');
        for(var i=0 ;i<arguments.length; ++i){
            lr.message( 'arg[' + i + '] type: ' + typeof arguments[i] + ' =' + arguments[i]);
        }
    }

    function Action()
    {
        var handle2 = vtc.connect('321.321.321.321', 8889, vtc.VTOPT_KEEP_ALIVE);
        var handle1 = vtc.connect('123.123.123.123', 8888, vtc.VTOPT_KEEP_ALIVE);
        lr.message('handle1: '+ handle1.handle + ' handle2: ' + handle2.handle);

        if(handle2.handle!==0){
            handle2.createColumn('CID_2', callback );
            handle2.updateMessage('CID_2', 1, 'bbbb', callback );
        }

        if(handle1.handle!==0){
            handle1.createColumn('CID_1', callback );
            handle1.sendMessage('CID_1', '111', callback );
            handle1.sendMessage('CID_1', '2222', callback );
            handle1.updateMessage('CID_1', 1, 'aaaaa', callback );
            handle1.columnSize('CID_1', callback );
            handle1.queryColumn('CID_1', 1, callback );
            handle1.rotateRow(vtc.VTSEND_SAME_ROW, callback );
            handle1.queryRow(1, callback );
            handle1.rotateMessage('CID_1', vtc.VTSEND_SAME_ROW, callback );
            handle1.rotateMessages1('CustomerID,CompanyName', ',', vtc.VTSEND_SAME_ROW, callback );
            handle1.clearColumn('CID_1', callback );
            handle1.getLastError( callback );
            handle1.disconnect( callback );
        }

        if(handle2.handle!==0){
            handle2.disconnect( callback );
        }
    }

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