Related Items with 2 child lists

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
TWendt
Posts: 109
Joined: Mon Sep 08, 2014

15 Jul 2016

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

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

17 Jul 2016

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.

TWendt
Posts: 109
Joined: Mon Sep 08, 2014

18 Jul 2016

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

marco_v
Posts: 2
Joined: Tue Jul 26, 2016

27 Jul 2016

Hi Tom, Did you solve the issue? If so, could you post the solution? I am struggeling with the same issue.



Regards, Marco

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

27 Jul 2016

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}'
});

TWendt
Posts: 109
Joined: Mon Sep 08, 2014

03 Aug 2016

Many thanks, now it's working.

Best regards

Tom

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests