Related-items in new form

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
ksertkaya
Posts: 87
Joined: Wed Nov 18, 2015

22 Aug 2017

Hi,

How can I set childID to ID in related-items in new form?

ChilId = SupplierID in this form.

http://prntscr.com/gbm5mi

Thanks.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

22 Aug 2017

Hello, ksertkaya!
Please read this article about connecting child to the New Form - https://spform.com/documentation/relate ... gular-mode

The issue is that the New Form has no ID yet, as the item is simply not created yet. To resolve this issue, we recommend using hidden field on the child New Form which would grab temporary value from the parent.

Once you save the parent Item children are automatically binded to it by the ID. But be careful, if you create children items, but do not save the parent Item, they will remain in the list as they were already created, but without any parent for them.
Cheers

ksertkaya
Posts: 87
Joined: Wed Nov 18, 2015

11 Sep 2017

Hi again,

When I add new item, I see items which I added recently. Is it normal?

http://prntscr.com/gjtdhs

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

12 Sep 2017

Hello!
It might happen sometimes, especially during configuration, but should go away eventually, unless you keep adding new items to the Children List not via Related Items control. You can make sure that everything is configured correctly and works, and then delete these items that show up as new. It shouldn't happen again in the future, but let us know if it does, we'll take a closer look to make sure that everything works correctly.
Cheers

ksertkaya
Posts: 87
Joined: Wed Nov 18, 2015

12 Sep 2017

I resolved this issue thanks :) another question:

I have a form based on three lists with parent-child-grandchild relations.

A - parent
B - child for A
C - child for B (grandchild for A)

I saved parent table. After I follow like this picture. But it shows nothing.
Screenshot_13.png
Screenshot_13.png (82.98 KiB) Viewed 1870 times
B- Table

Code: Select all

fd.populateFieldsInGrid($('.related-q1'), {
  QualityID: '{CurrentItem}',
});
Screenshot_14.png
Screenshot_14.png (18.68 KiB) Viewed 1870 times
C - Table

Code: Select all

if (window != window.top && window.top.fd) {
  // the form is opened in a dialog from the parent form
  var parentId = fd.getSourceID();
  if (parentId) {
    // the form is opened from the Edit form
	alert(parentId);
    fd.field('QualityID').value(parentId);
  } else {
    // the form is opened from the New form
    $('#_fd_parent_temp > input').val(window.top.fd._tempParentId());
  }
   
  //$('.parent-field').hide();
}

Code: Select all

<div id="_fd_parent_temp">
<asp:HiddenField runat="server" ID="_fd_parent_tempField" __designer:bind="{ddwrt:DataBind('i','_fd_parent_tempField','Value','Load','ID',ddwrt:EscapeDelims(string(@ID)),'@_fd_parent_temp')}" />
</div>

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

12 Sep 2017

This looks like a pretty complex system to me :) Not sure what exactly is the problem, there is so much on the screen. Everything looks fine to me, more or less so.

My advice would be to first implement similar relationship with new empty lists, so nothing else gets in the way. Start slow, do parent and child, then child and grandchild. If you encounter the problem once again, let us know, we'll take a closer look, but it's very hard to say what exactly is wrong and what must happen by these pictures alone.

It's best to create test lists and forms first, see how it works and copy this functionality to the final forms with all the fields and tabs. It would be clearer to both us and you what exactly goes wrong in this case.
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests