There is a conclusion of projects on the map, but it does not work very well.

my problem is probably one global one does not display the first element a piece of code here

'https://plnkr.co/edit/YaHaFjjul29pcvlTGKiS?p=info' 

Those. if I have only 1 item, it is not displayed (What's wrong?

    1 answer 1

    if (! $ BDRes-> GetNext ())

    It is not necessary to check the presence of elements in the sample, because in this case, you get the first element and then, in a loop, start processing starting from the second element.

    If you need to know the presence of elements in the sample, use the SelectedRowsCount method, which returns the number of selected records.