Related items quick edit mode on new form not getting parent ID

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Oz.Ab
Posts: 39
Joined: Mon Oct 09, 2017

19 Oct 2017

Hi guys.

I have been staring at this: https://spform.com/documentation/relate ... -edit-mode
And searching the forum for 3 hours.

I have a parent list.
- when I open new form I fill in title. Then I have the related list in quick edit mode only that I need to add 1 or more child items to. Then I hit save.
--- note that I had the new form as dialog, but I also tried to have it open as page.
- The child items never get the parent ID.

On the new form I did the following
1. Pick the source list in the Data Source editor and set filtering option to ‘Show new items only’.
- note that when I open up a new form I still see the older child items in the related items list even though it is "show new items only".
2. Switch the Related Items control into grid mode by setting Quick Edit property to Only.
3. Assign a unique Css Class to the Related Items control, e.g. ‘related-items’.
4. Insert the following code into JavaScript editor: fd.populateFieldsInGrid($('.related-items'), { T: '{CurrentItem}' });
- note that "T" is the internal name of the field in the child item list that I want to get the parent ID.
- "T" is not visible in the related-items view on the parent form.
- "T" does get a value if I just make it get the value 'test'.

Hope you can assist

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

19 Oct 2017

Hello, Oz!
This would definitely not work on New Form in dialog mode, so don't try that, but it should work in regular mode.
Also, please try same code on the Edit Form, will it work or not?
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests