Having trouble adding random number to a list of things

No, I don’t really need the random numbers at all. What I need is to be able to take an existing group of things, and randomly populate a field in each one of them with a number from 1 to n.

I can create a repating list and sort randomly, but I cannot figure out how to save an integer to the database based on this sorting, using a single button or workflow. I can do it if I put a button on each row of a repeating group, because then it gives me access to that cell’s thing. But for that to work, the user will end up needing to click on 10 (or more) different buttons, to save the value in each thing. There has got to be a way to do this with one button.

Other people have had similar issues–I posted in the following discussion hoping for some clarification, but I haven’t gotten any yet: