Regarding related items with quick edit

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
WinstonFroidPinto
Posts: 32
Joined: Thu Mar 16, 2017

05 Apr 2017

Hi,

I have related item in my form with quick edit as only/optional.If i select quick edit to only,if i add some items and click on stop edit at the top then all data gets cleared in the grid.How to prevent it?

Thanks,
Winston.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

05 Apr 2017

Hi,
Most likely, new items do not fit the filtering criteria you specified in the Data Source property of the Related Items control. Say, if you filter the related items by a lookup field, it must be populated for new items. Please, read the documentation:
https://spform.com/documentation/relate ... -edit-mode

User avatar
WinstonFroidPinto
Posts: 32
Joined: Thu Mar 16, 2017

12 Apr 2017

Hi,
The issue is with related items with quick edit set to optional only for the newform.I want something like if i create 5 items in the new form with datasource set as show new items only,and stop editing it should show me those 5 items.Works perfectly for the edit forms since i am filtering the items there based on id and populatefieldsingrid method will save the lookup id directly on addition of each list item in grid,but for the new form i am using {curentitem} to populate lookup field.

Thanks,
Winston.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

13 Apr 2017

Right, it seems that list views do not support filtering by a cookie parameter dynamically without refreshing the page. Try to add the following code into the new form:

Code: Select all

ExecuteOrDelayUntilScriptLoaded(function() {
	var ExitGridO = ExitGrid;
	ExitGrid = function(view, noRefresh, callback) {
		return ExitGridO(view, noRefresh, function() {
			if (typeof callback == 'function') {
				callback();
			}
			
			window.setTimeout(function() {
				window.__doPostBack();
			}, 500);
		});
	}
}, 'inplview.js');

User avatar
WinstonFroidPinto
Posts: 32
Joined: Thu Mar 16, 2017

13 Apr 2017

Thanks, it worked.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests