I've found an issue where if i have a field inside a table or repeater area which has the same name as the table field when saving inside a loop function, the new update seems to save all rows with the same field data as the last one in the loop
E.G.
If I have a repeater called invoice_lines with a view called value

The view is a field within the repeater named sd[{var:invoice_lines.key}][value]

I then have a loop function called loop_sd_status_update.

Inside the loop i have a function called {fn:service_status} which is a save data type function

If I run this it will save all the updated records inside the loop with the same value - the last one in the loop.
However If i rename the field to say sd[{var:invoice_lines.key}][val] ( changing value to val and also inside the data fields) it works as it should without issue.
Below is a debug of the save without changing the form field name:



Below is a debug of the save with changing the form field name:


The other issue I've noticed ( probably related) is if I update a record outside the loop function ( so a normal save data function)

If i want to update a record with a table field name called value with a form field called total_value, again this will override with the last loop value even though this function is outside the loop

So if anyone else comes across this issue, rename your fields slightly and it should work until there is an update to solve this.
Max / admin - I can send more info over if required. to help address this.
E.G.
If I have a repeater called invoice_lines with a view called value

The view is a field within the repeater named sd[{var:invoice_lines.key}][value]

I then have a loop function called loop_sd_status_update.

Inside the loop i have a function called {fn:service_status} which is a save data type function

If I run this it will save all the updated records inside the loop with the same value - the last one in the loop.
However If i rename the field to say sd[{var:invoice_lines.key}][val] ( changing value to val and also inside the data fields) it works as it should without issue.
Below is a debug of the save without changing the form field name:



Below is a debug of the save with changing the form field name:


The other issue I've noticed ( probably related) is if I update a record outside the loop function ( so a normal save data function)

If i want to update a record with a table field name called value with a form field called total_value, again this will override with the last loop value even though this function is outside the loop

So if anyone else comes across this issue, rename your fields slightly and it should work until there is an update to solve this.
Max / admin - I can send more info over if required. to help address this.
Your save data action inside your loop should have as its data source
{var:loopname.row}
{var:loopname.row}
I thought that, but changing it still caused the value fields to overrride the value table field in save_assignee save data function. Also it used to work perfectly before the update, so something has changed since , so I thought I had to mention it just in case others had a similar problem.
This topic is locked and no more replies can be posted.