Dear friends,
I must found the last number (field 1) of this array if the cCode ( field 2) is "01"
Local aData:= { ;
{4,"01","17/03/2020","17/03/2020"} ,;
{7,"02","17/03/2020","18/03/2020"} ,;
{7,"01","17/03/2020","18/03/2020"} ,;
{11,"02","17/03/2020","18/03/2020"} ,;
{8,"01","17/03/2020","18/03/2020"} }
local cCodice:="01"
I try with
ASort( aData ,,, {|x,y| If ( x[2] == cCodice, x[1]< y[1],) } )
How I can make to found the last value for the code "01" ?
it must return me 8
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