Share this page

# lrvtc.getColumnRange

Retrieves a range of values from a column, from a start index to an end index.

Note: This function is supported from version 26.3.

    lrvtc.getColumnRange ( string columnName, int start, int end );

## Arguments

Name | Comments
--- | ---
columnName | The column name.
start | The row number to start retrieving from. The first row has index 1.
end | The row number to stop retrieving at (inclusive).

Retrieves the values in the specified row range from the given column. The retrieved values are stored as `{columnName}` for a semicolon-delimited concatenation of all values, and `{columnName_count}` for the number of values retrieved.

Tip: To avoid performance issues, it is recommended to keep the range smaller than 1000.

## Return Values

Returns zero on success, or one of the Error Codes on failure.

## Parameterization

All string input arguments can be passed using standard parameterization.

## Example

Copy code

    var   VtsServer = "localhost";
    var   nPort = 8888;
    var   rc, rc1;
    rc = lrvtc.connect(VtsServer,nPort,lrvtc.VTOPT_KEEP_ALIVE);
               lr.logMessage("Connect result rc= "+ rc);

    rc1 = lrvtc.getColumnRange("A", 3, 5);

    lr.logMessage("rc1= " + rc1);
    lr.logMessage("count= " + lr.evalString("{A_count}"));
    lr.logMessage("val1= " + lr.evalString("{A}"));

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: