[closed] Remove empty array object not working (FC7)

I have an array like so:

When clicking remove on the (incomplete) item it is removed, but after saving and opening to edit the parent object the (incomplete) object is still there.

Are you doing any custom stuff in beforesave, or aftersave? Have you tried removing the record from the DB (the type_aArrayType table?) and see if you can get it to come up again?

@trondulseth i can’t replicate this issue on 7.2. Are you still seeing this problem? Did you raise an issue?

After struggling with this issue at various moments I have some clues as to what is happening. The data in the arrays are also worked with from outside the Farcry sphere - and it seems that when there are one or more items in the array table that lacks a ‘seq’ value Farcry will do strange things - like not removing items, or multiplying rows in the array table.

In this particular case I’ve now modified all code that works with the arrays to make sure there is a ‘seq’ value present - and also has made a script that loops through the arrays making sure there are no duplicates and making sure a ‘seq’ value is in place.

1 Like