avListManager - Filter selection

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
csturtev
Posts: 12
Joined: Thu Feb 02, 2017 6:54 am

avListManager - Filter selection

Post by csturtev »

Is there a way? Once you have selected an item from the filter search and are displaying your detail (a reusable part). Have a button (Next button) that will allow the user from the reusable part to scroll through the instance list without having to go back to the filter window to select the next in the list? Something along the lines of #avListManager.GetNextInstance...........
User avatar
Dino
Posts: 477
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: avListManager - Filter selection

Post by Dino »

If talking about VLF-WIN, The example DF_DET22 (List Manager Technique: Show All Entries) uses #avListManager.GetInstance to access all the entries in the instance list from the command handler. Using this, you could have your own logic to access the next one, or any other elements in the result instance list.

Code: Select all

Clr_List Named(#SELECTION)
Invoke Method(#avListManager.GetInstance) First(TRUE) Visualid1(#Std_Texts) Visualid2(#Std_Text) Akey2(#xEmployeeIdentification) Returncode(#ReturnCode.Value)
Dowhile Cond(*RetOkay)
Fetch Fields(#xEmployeeGivenNames #xEmployeeSurname #xEmployeeStreet) From_File(xEmployee) With_Key(#xEmployeeIdentification)
Add_Entry To_List(#SELECTION)
Invoke Method(#avListManager.GetInstance) First(FALSE) Visualid1(#Std_Texts) Visualid2(#Std_Text) Akey2(#xEmployeeIdentification) Returncode(#ReturnCode.value)
Endwhile
but if you are talking VLF-ONE, then GetInstance is not available, you have to use a different technique described in the example DF_T54H2O:

Code: Select all

Clr_List Named(#SELECTION)
For Each(#DataItem) In(#AVLISTMANAGER.DataItemsbyUII)
If (#DataItem *IsNot *null)
#xEmployeeIdentification := #DataItem.avAKey1
#std_nvarc := #DataItem.avVisualID2
#xEmployeeStreet := #DataItem.avAColumn2
Add_Entry To_List(#SELECTION)
Endif
Endfor
Post Reply