te comento: tengo un array que genero asi (con una tupla incluida):
- Code: Select all Expand view
- AAdd( ::aTree, { oQry:FieldGet( "c7" ) + " " + ::cCargo, ;
{ ;
"nId" => oQry:FieldGet( "c4" ), ;
"nIdPadre" => oQry:FieldGet( "c5" ), ;
"dFecha" => oQry:FieldGet( "c7" ), ;
"nHitem" => 0 ;
} } )
Luego necesito recorrer ese array para buscar un determinado valor que viene desde una tabla,
el valor existe y tambien existe en el array ::aTree pero el aScan me dice siempre que la posicion es cero
cuando deberia de ser mayor a cero:
- Code: Select all Expand view
- nPosicion := AScan( ::aTree, { | xCelda | xCelda[ 2 ][ "nId" ] == oQry:FieldGet( "c5" ) } )
En cambio si me recorro el array con un FOR NEXT o FOR EACH el valor existe.