nca_lov_retrieve_items
| List Object Functions |
Retrieves items from a list of values.
int nca_lov_retrieve_items( LPCSTR name, int first_item, int last_item );
| name | The logical name of the window containing the list of values. |
| first_item | The index of the first item in the list of values. |
| last_item | The index of the last item in the list of values. |
The nca_lov_retrieve_items function retrieves items from a list of values, based on the specified range. The range is indicated by the function's parameters, first_item and last_item, where "1" indicates the first item.
If you specify an index for last_item that does not exist, you will receive a warning, and the function retrieves the items until the last available value. This is especially relevant when the number of values in the database changes. For example, suppose you recorded nca_lov_retrieve_items("Journals", 1,8) but the database changes, leaving only 7 values in "Journals." In this case, the function returns a successful result but a warning message is sent.
Return Values
Parameterization
You cannot use standard parameterization for any arguments in this function.
Example
In the following example, The nca_lov_retrieve_items function retrieves nine values each, for Periods, Categories, and Currencies.
nca_edit_click("GLXJEENT.FOLDER_QF.USER_JE_SOURCE_NAME.0");nca_button_press("GLXJEENT.TOOLBAR.LIST.0");nca_lov_retrieve_items("Periods",1,9);...
nca_edit_click("GLXJEENT.FOLDER_QF.PERIOD_NAME.0");nca_button_press("GLXJEENT.TOOLBAR.LIST.0");nca_lov_retrieve_items("Categories",1,9);nca_lov_select_item("Categories", "Addition");...
nca_edit_click("GLXJEENT.FOLDER_QF.USER_JE_CATEGORY_NAME.0");nca_button_press("GLXJEENT.TOOLBAR.LIST.0");nca_lov_retrieve_items("Currencies",1,9);nca_lov_select_item("Currencies", "USD");

