N

Indicates the current GetDados line, in positions 3, 4 and 6, which respectively are Measurements, related Nonconformances, and Instruments. To check the current line in the GetDados function, just use it's public variable, N.

When the aResultados vector is used, you cannot know the position of the current measurement line, except when the GetDados function compares the line's position with the position saved in the aResultados.

Example:

//We are in the measurements folder, activating validation

   nPosmed := Ascan(aHeader,{|x|AllTrim(x[2])==\"QES_MEDICA\"})

   cMedRes := aCols[N,nPosMed]

   If cMedRes == aResultados[nFldLab,3.nFldEns,N, nPosMed]

...

   Else

...

   EndIf

Important: 
  
The N variable does not work in the aResultados while the GetDados function is not being used and directly accessing the aResultados. Thus, we must indicate the line position to manipulate.