Share this page

# nca_lov_select_index_item

List Object Functions

Selects an item from a list of values by its index number.

    int nca_lov_select_index_item( LPCSTR name, int index );

name | The logical name of the window containing the list of values.
index | The numerical index of the item to be selected.

The nca_lov_select_index_item function selects an item from a list of values using the item's index number.

## Return Values

Oracle NCA Error Codes

## Parameterization

The following variable can be parameterized using standard parameterization: name

## Example

In the following example, each entry in the table called Journals is accessed. The function nca_obj_get_info retrieves the number of rows in the window. A for loop then sets the index i and the function nca_lov_select_index_item uses the indexto pull out each successive entry.

Copy code

    char num_rows_string[3];
    int num_rows, i;
    nca_set_window("Journals");
    nca_lov_retrieve_items("Journals", 1, 18);
    <i>/* Find out how many entries in the "Journals" table there are */</i>
    nca_obj_get_info("Journals", "num_rows", num_rows_string);
    num_rows = atoi(num_rows_string); <i>/* num_rows holds the number of entries */</i>
    <i>/* Iterate through each item */</i>
    for (i=1; i<num_rows; ++i) {
         nca_lov_select_index_item("Journals", i);
         <i>/* To retrieve the next entries a switch is required */</i>
         nca_menu_select_item("N", "File;Switch Responsibility...");
         nca_lov_retrieve_items("Journals", 1, num_rows);
    }

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: