Page 1 of 1
avListManager - Filter selection
Posted: Sat Sep 25, 2021 1:16 am
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...........
Re: avListManager - Filter selection
Posted: Sat Sep 25, 2021 6:26 am
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