Hello Claudio,
You don't write what doesn't work.
My approach in general is like this. The function returns an array of the content of the passed column (as symbolic name, in my function I can add multiple columns) for selected elements:
FUNCTION SelectedLVItems(oLVControl,sKol1)
nItems:=oLVControl:SelectedCount
IF nItems>0
oItem:=oLVControl:GetNextitem(LV_GNIBYITEM,,,,TRUE,,) // 1st item
uZoek:= oItem:GetValue(sKol1)
AAdd(aValues,uZoek)
FOR ni:=2 TO nItems // next selected items, if any
oItem:=oLVControl:GetNextitem(LV_GNIBYITEM,,,,TRUE,oItem:ItemIndex)
uZoek:= oItem:GetValue(sKol1)
AAdd(aValues,uZoek)
NEXT
ENDIF
RETURN aValues
Then (with some extra steps we added) I empty both Listviews first:
IF SELF:oDCLV1:ItemCount>0
oDCLV1:DeleteAll()
ENDIF
IF SELF:oDCLV2:ItemCount>0
oDCLV2:DeleteAll()
ENDIF
and finally we add the value retrieved from 1 LV for each line to the second:
METHOD VulLVLine(cKol1 AS STRING,cKey AS STRING,oLV AS OBJECT) AS LOGIC PASCAL CLASS SelectReceivers
//#s Add item cKol1 with key cKey to listview oLV
LOCAL oItem AS ListViewItem
oItem := ListViewItem{}
oItem:SetValue(cKol1,#Kol1)
oItem:SetValue(cKey,#KEY)
oLV:AddItem(oItem)
RETURN TRUE
I realize it's done differently but I think you left some septs out and looking at this code you can hopefully solve it.
Dick