Along the datatable based approach, used for calculating the presence and row index also have a look at this alternate option:
here we defined an integrated anchor to the specific ID/Name/Value with a dynamic selector and click in the same row the element of interest