Erro ao recuperar o CurrentRowNumber de uma lista de registros (list of records)

Erro ao recuperar o CurrentRowNumber de uma lista de registros (list of records)

  
Preciso recuperar o CurrentRowNumber de uma lista de registros para identificar unicamente um registro de uma lista e carregá-lo no formulário (para editar os dados).
Porém, o CurrentRowNumber retorna o valor 0 para qualquer registro selecionado, não permitindo o carregamento dos dados no formulário.


Hi Maria,

Can you provide the sample oml file?

Thanks,
Manish Jawla
Solution
Hi Maria,

First of all, we would appreciate if you could ask in English, given the majority of the people in the forums don't speak Portuguese. Also English is the language of this community. 

The CurrentRowNumber is a runtime property of the list that contains the current index of the item that is being iterated. That said, if you are not iterating the list (in a foreach for example) you will get value 0 from this property. In addition, if you want to get a identifier of a element in the list, you should not use CurrentRowNumber property, since it is dinamic, and it is not identifies a register. Instead, you could use the Id attribute of the element (if it has one).

Hope it helps!

André Siébra
Solution
Thank you.