How to set an array value in a control code ?

I want to set the value of an array item in a contro, for exemple :

test - OnAfterGetRecord()

WHILE ((counter < NbreCmdesMax) DO BEGIN

counter += 1;

controlxxx := Array[counter];


is it possible ? thanks !

If I had understood correctly. Use ARRAYLEN function.

Could you specify a bit here? Are you trying to set the control to the value of the Array[counter] when counter is a certain number, or do you want to set it to the amoutn of elements that the array holds?