Hi,
Just starting designing some forms for our SharePoint Online lists, and already have a question 8)
I’m trying to make the ‘acquisition request’ form based on 2 lists:
- AR (basic info on acquisition request) - parent
- AR details (which has lookup field retrieving information from AR) - child
child list has been placed inside parent list form and parent/child relationship established.
when user goes through complete form and saves at the end, both parent and child list items are entered into lists (as expected)
if user fills in the child list items on the form and does not save it but hits close,
parent list remain empty but children items entered into the form remain in the child list with parent lookup field data missing…(although its set as mandatory field)
Is there a way to ensure ‘orphans’ are erased if user does not ‘save’ the form?
Any suggestions would be appreciated…
Kind regards,
Dear @zmanowsky,
Could you please provide some screenshots on your issue?
Hi Alex, thank you for taking interest in this issue:
Here are the screenshots:
This is Step2, users get to it after entering basic info (Parent list) and clicking next.
Form is not saved yet at this point!
Users get to enter the items into the child list.
The changes are visible in the child list immediately as presented below:
If at this point user decides not to submit the form but just closes it instead for whatever reason,
items entered into child list remain in the list...
Considering Parent list item was never saved, it's ID is not "created" and therefore it does not update the lookup (relationship) field of the child list.
So child list items become effectively orphans...
Interesting thing, considering that 'orphan' entries in the child list don't have relationship ID column populated, they show up when next user starts to fill in the Parent list form...
Hope I didn't over-complicate the explanation...
Kind regards,
Dear @zmanowsky,
Thank you for the request, the issue was reproduced, we are in process of investigating.
Dear @zmanowsky,
The issue was clarified, it was made by design. Users won’t see child items created by other users in a new form since filtering by author. So, if a user left a new form without saving it, he can return to the new form next time and see all child items he created last time.
You could create a flow to clean up these items.
Also the annoying thing where fields stay populated (causes lots of issues for users) you can avoid by clearing the storage in the javascript console
localStorage.clear();
Hi Alex,
thank you for looking into this.
While I do understand now that’s a design choice, I have to ask is there a way to ensure that child list is cleared of only the relevant items if the form is closed without saving?
Kind regards
Hi Chis,
thank you for your suggestion!
What/when would be the trigger for the flow execution?
How would you ensure only child list items which are relevant to the previous (unsaved) form are deleted and preserve the ones which are being created at the moment of the flow execution?
Any advice would be quite appreciated…
Kind regards
Dear @zmanowsky,
You can either use only Edit form or run scheduled tasks to avoid the child items without parents: https://docs.microsoft.com/en-us/flow/run-scheduled-tasks