mrackley / StratusForms

Lightweight InfoPath alternative for SharePoint 2007,2010,2013,2016,2019 and Office 365
82 stars 36 forks source link

Items in Child List Deleted and Re-Created on Form Save #68

Closed packman83 closed 4 years ago

packman83 commented 4 years ago

SCENARIO: I have a parent list (reports) and a child list (expenses). On the HTML form the child list is presented as repeated content (similar to the timesheet example).

ISSUE: When saving changes, regardless if any data is changed, the items in the child list are deleted and then re-created as new items. If there are 10 items in the child list associated with the parent list item I'm saving, those 10 items are deleted and re-created with the same data.

This wouldn't be an issue except any version history is lost with the deleted items. These are expenses so that could be a problem if we need to audit any expenses. We also lose who originally created that expense item (yes, it's still on the parent report item but there are places where I'm referencing the expense item author).

I can't figure out why this is happening or if it's expected behavior.

mrackley commented 4 years ago

This is expected behavior. There were a few reasons for this architectural decision, the main one being it became a nightmare to try and keep that child list in sync with all the possible scenarios that could happen. The child list is meant for reporting purposes only. The data for the child list is stored in the StratusFormsData object on the main list and this will contain the version history for those child items as well as who made the updates.

packman83 commented 4 years ago

This is good to know, thanks for the response! I will mark this as closed.