AWS - which button is pressed

I am generating a variable number of ‘submit’ buttons in a loop - but I can’t work out how to determine which has been pressed. Any suggestions?

Further information:
The relevant bit of the loop is:

All the buttons have the same text on them, so identifying the button by that isn’t an option.
I think what I need is to be able to ‘step’ the button name in some way as I go round the loop, but haven’t found a way to do that.
(The routine which is called when a button is pressed is outside the loop, so the loop counters don’t work either)