Multiple fields with same name in repeater area causing save update issue in CC6.0.10

bensonley 31 Mar, 2019
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

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 1

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

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 2

I then have a loop function called loop_sd_status_update.

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 3

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

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 4


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:

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 5

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 6

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 7

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

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 8

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 9

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

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 10

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

Multiple fields with same name in repeater area causing save update issue in CC6.0.10 image 11

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.
healyhatman 01 Apr, 2019
Your save data action inside your loop should have as its data source
{var:loopname.row}
bensonley 01 Apr, 2019
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.