Page 1 of 1

Related Items with 2 child lists

Posted: 15 Jul 2016
by TWendt
Hi,

is it possible to work with the related items and two child list? What must i do to add the second child list.

Best regards

Tom

Re: Related Items with 2 child lists

Posted: 17 Jul 2016
by Dmitry Kozlov
Hi Tom,

Do you mean two lists linked to the parent item? If so, just drop two Related Items controls onto your form and configure them appropriately.

Re: Related Items with 2 child lists

Posted: 18 Jul 2016
by TWendt
Hi Dimitry,

i have one parent and two child list. In the new form i added the first child list (Tasks). In the edit form i added the second List (State). In the new form, everything is okay. I can create entries in the task list and if i open the edit form, all tasks are correct displayed for the event i created in the parent list. But when i add a state in the edit form all entries for all events are displayed.

Javascript from the edit form.

fd.populateFieldsInGrid($('.related-items'), {
Title: '{CurrentItem}'
});
fd.populateFieldsInGrid($('.related-state'), {
RelatedState: '{CurrentItem}'
});

Please help.

Best regards

Tom

Re: Related Items with 2 child lists

Posted: 27 Jul 2016
by marco_v
Hi Tom, Did you solve the issue? If so, could you post the solution? I am struggeling with the same issue.



Regards, Marco

Re: Related Items with 2 child lists

Posted: 27 Jul 2016
by Dmitry Kozlov
Hi,

Check the following points:

1. Both Related Items controls must be configured in the client-side mode with quick editing.

2. Both lists must contain a lookup field pointing to the current list.

3. You must use those lookup columns in your code:

Code: Select all

fd.populateFieldsInGrid($('.related-state'), {
   ParentField: '{CurrentItem}'
});

fd.populateFieldsInGrid($('.related-items'), {
   ParentField: '{CurrentItem}'
});

Re: Related Items with 2 child lists

Posted: 03 Aug 2016
by TWendt
Many thanks, now it's working.

Best regards

Tom