Binding current item ID to subforms doesn't work

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

10 Jul 2017

On the surface, everything looks correct. Try adding alert or console.log to your code to see if the value is getting retrieved correctly:

Code: Select all

var parentId = window.top.GetUrlKeyValue('ID');
alert(parentId);
Also, make sure that Participant field looks up ID field in the Source list
ParentID.jpg
ParentID.jpg (13.5 KiB) Viewed 2693 times
Cheers

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

12 Jul 2017

Chris, if you still experience this trouble, I think we might've found what was going wrong. Simply replace this:

Code: Select all

var parentId = window.top.GetUrlKeyValue('ID');
with this:

Code: Select all

var parentId = parseInt(window.top.GetUrlKeyValue('ID'));
It caused issues if the Parent field was not referring to the ID of the parent. We've also updated the instruction.
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests