Related items quick edit mode on new form not getting parent ID
Posted: 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
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