How to set values for each cell's item in a dynamic repeating group?

@NigelG, hoping you can clarify one thing.

I have a very similar situation going on, but instead of wanting to store a different user input on different things in a repeating group, I’m trying to automatically rank a group of things randomly, from 1 to N. Here is the method I’ve devised (up to this point):

  1. Show the group of things in a repeating group
  2. Use the random number generator plugin to insert a random number element into each row of the repeating group
  3. Somehow I need to save the random number for each thing in the database (this is the part where I’m stuck)
  4. Once the random numbers are entered, either use the same repeating group or create another repeating group to sort them numerically, and assign a position (1 to n) based on the sorting
  5. Save the final rank to each thing (stuck here as well)

To solve steps 3 and 5, I was hoping to use the random number generator to populate the initial data of an input field, and then use the auto-binding feature to insert those numbers into the database. But when you enable auto-binding, the initial data formula is removed. See below screenshots for example:

Initial content works, but auto binding is not enabled.
image

One auto binding is enabled the initial content goes away.
image

I’m also open to any other suggestions to allow me to randomly rank a group of things from 1 to N, and store that rank in the database once the thing is already created.

You might wonder why I didn’t just insert a random number when the thing was first created? I already tried this, but these things are created via an API workflow on a list of things. I could not find a way to run the API workflow on 2 lists simultaneously (like an array of sorts), where list 1 is a list of users I’m using to create these things, and list 2 is the random numbers. I also tried to access the “Calculate Random String” from the workflow, but this is typecast as a string and not a number (see discussion here: Random number generator - #10 by dominic.josiah)

Any suggestions on how to make this work would be really helpful.