I’m not sure what you mean by
I have two repeater fields, the second is duplicated from the first. The first one works fine, but the second one does not return any data.
It would probably help to see the code from both repeaters, I don’t see anything wrong with the code you posted