Share this page

# nca_lov_get_item_name

List Object Functions

Retrieves the name of an entry in a list of values by the entry's index number.

    int nca_lov_get_item_name( LPCSTR name, int item_index, char *value );

name | The logical name of the object whose value(s) you want to find.
item_index | The numerical index of the value to find.
value | An output parameter that holds the value which has been found.

The nca_lov_get_item_name function retrieves the name of an entry in a list of values and writes it into the value parameter of the function. Enough memory space for value must be allocated before calling the function.

## 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 obj_get_info retrieves the number of rows in the window. A for loop then sets the index i and the function nca_lov_get_item_name retrieves the name value which is then sent to the output. Note that the parameter `item_name` has been allocated prior to the call to nca_lov_get_item_name.

Copy code

    char num_rows_string[3], item_name[40];
    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_get_item_name("Journals",i, item_name );
         lr_output_message("The name of the item is %s", item_name );
    }

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: