Hey @robert,
I’m assuming you don’t want to use auto-binding or workflows to update the records as they change, which would be easier than the below but doesn’t achieve the same user experience.
That being said, I seriously hope somebody posts a simpler solution, but the following works:
Basically, we are going to temporarily store the input values contained within the repeating group in a custom state (type text.) Its value will be the _id of record we are updating followed by a pipe symbol, then then new value. (This solution breaks if your data has pipe’s. )
We then have a triggering event that fires off if that custom state has records in it AND a second custom state has been set to yes – this will be done by the button outside of the repeating group.
Looks like this:
An expression element concatenates the cells unique id with the input value
When any input value is changed, we add it to a custom state using the Expression value
To trigger the save, we set a custom state to yes
The following triggers any time there are records to be save, and the perform update state is yes
When triggered, we schedule an api on a list – the list of records to update from the custom state
We extract the values we need from the values in the list:
And we reset the perform update back to No:
And also clear the dirty records:
The api we call gets the id and new value
And updates the data thing (in my example, a thing called random) by searching for the unique id
Like I said, I’m really hoping somebody chimes in with a better solution!
Looking to improve your Bubble™ skills?
Let me turn
into
Coaching and Development at https://uniqueideas.com or schedule a free intro session
Ken Truesdale
LinkedIn