Related Items with 2 child lists

rss

Posted by TWendt - Jul 15 ’16 at 07:23

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

 

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 9 months 26 days
    #1 by Dmitry Kozlov Jul 17 ’16 at 06:17

    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
    Member
    Member for: 4 years 10 months 8 days
    #2 by TWendt Jul 18 ’16 at 02:44

    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
    Member
    Member for: 3 years 19 days
    #3 by marco_v Jul 27 ’16 at 02:01

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

     

    Regards, Marco

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 9 months 26 days
    #4 by Dmitry Kozlov Jul 27 ’16 at 07:57

    [#3]: 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:

     
    fd.populateFieldsInGrid($('.related-state'), {
       ParentField: '{CurrentItem}'
    });
    
    fd.populateFieldsInGrid($('.related-items'), {
       ParentField: '{CurrentItem}'
    });
    
  • TWendt
    Member
    Member for: 4 years 10 months 8 days
    #5 by TWendt Aug 3 ’16 at 02:50

    Many thanks, now it's working.

    Best regards

    Tom

     

Displaying 1 to 5 of 5 messages