When I insert a product I add an array
aadd(aColBtn,{nItem,ncolSer} )

nItem is the number of Item and mColSer is the colum where I show the product
before to show the product I try to search the value of ncolSer on array aColBtn
If Len(aColBtn) >0
nColser:= ascan( aColBtn, {|e| e[1] = nItem})
If nColser=0
ncolSer:=200
Endif
else
ncolSer:=200
endif
the problem is the procedure found the nItem but take the first of the array with same nItem and not that having the max value
then I thinked to make another test
I when save on array aColBtn I must erase all records having the same nItem
adel( aColBtn, {|e|e[1] = nItem},.t.)
and I can save the current value
aadd(aColBtn,{nItem,ncolSer} )
but not run
because adel erase all records why ?
aadd(aColBtn,{nItem,ncolSer} )

nItem is the number of Item and mColSer is the colum where I show the product
before to show the product I try to search the value of ncolSer on array aColBtn
If Len(aColBtn) >0
nColser:= ascan( aColBtn, {|e| e[1] = nItem})
If nColser=0
ncolSer:=200
Endif
else
ncolSer:=200
endif
the problem is the procedure found the nItem but take the first of the array with same nItem and not that having the max value
then I thinked to make another test
I when save on array aColBtn I must erase all records having the same nItem
adel( aColBtn, {|e|e[1] = nItem},.t.)
and I can save the current value
aadd(aColBtn,{nItem,ncolSer} )
but not run
because adel erase all records why ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com