How do you bind a repeat row to a datastore? This driving me nuts!

I have a repeat and it creates rows when you click a button by adding a record in a DataStore and counting the records. this row has an empty text field - all works fine.

BUT

I also need for each of those rows in the repeat to hold their id record in the DataStore so that when I update or delete a row in any order I can pass the ‘id’ to the the data-store for that repeat row.

How on earth do you do this? I have used $index as the row 'id 'but that is not ideal as it relies on the page not being refreshed. I need a variable for each row created to store the row ‘id’ that is submitted to the Datastore, so I can then pick it when I need to to do a row update or insert.

I also need the row id so that I can add in a child repeat which references the parent repeat.

Non of this is connected to the database it is dynamically created in the front end to collect data and update a datastore.

But can not figure out how to do this?

Any help on how to do this?

Community Page
Last updated: