Passing a lookup field to related Items control

rss

Posted by bnunweiler - Jun 10 ’14 at 05:10

Hello. I have a new form which will add items to a list (and refresh after each item), and a related items control under it, which will view all the items in the list. However, since it's the same list the Data Source, it won't let me Filter by a lookup field. I set a Parent ID when I add items to the list; can I set the Parent ID with JS, so that the Related Items only show the items just added?

 

Please let me know if this doesn't make any sense.

 

Thanks

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 9 years 2 months 10 days
    #1 by Dmitry Kozlov Jun 11 ’14 at 12:01

    Hello,

    You cannot add related items from a new form because there is no ID of the parent item to link it with children. First, you have to create a parent item and then add related items from its edit form. So I would recommend you to design the New form without related items control and put JavaScript code to redirect users to the Edit form right after creation as described in the following post:

    http://formsdesigner.blogspot.com/2013/10/how-to-open-edit-form-right-after.html

    Put the related items control onto the Edit form and filter them by the lookup field in the Data Source configuration dialog.

    Feel free to ask the questions.

Displaying 1 to 1 of 1 messages