SPRequireUnique stopped working

Aug 22, 2012 at 4:10 PM
Edited Aug 23, 2012 at 5:52 PM

Hello!

I have been using SPRequireUnique on one of my lists for about a month and suddenly it stopped working today.  The list just reached 300 items this morning.

The interesting thing is that the initMsg is being displayed in multiple sections of the page, but not in the list item section of the New Form, where it was previously visible.  It is attached to both the OK and Cancel buttons, the site navigation drop down and two lines at the very top and bottom of the page.

I also examined the core.css and this has not been changed in over a month.

The functionality does not respond when a duplicate has been entered.  I have also tried attaching the columnStaticName back to the Title column with and no changes occured.

I have tried switching different SPServices and JQuery versions for resolution.  The versions that were previously working were SPServices 0.6.1 and JQuery 1.5.

 

$(document).ready(function() {
		$().SPServices.SPRequireUnique({	
			columnStaticName: "MC_x0023_",
			duplicateAction: 1,
			ignoreCase: "false",
			initMsg: "Please enter the MC#",
			initMsgCSSClass: "ms-vb",
			errMsg: "This MC# has already been recorded in the system.",
			errMsgCSSClass: "ms-formvalidation",
			showDupes: "true"
		});
	});

Am I doing something wrong?

Thanks!

 

 

Coordinator
Sep 11, 2012 at 1:08 PM

This is an odd one. Can you test to see if things work OK if you reduce the number of items below 300? Does the default view have an item limit of 300 by any chance? I'm specifying CAML parameters which should cause the queries to ignore the default view settings, but that's the only thing I can think of.

Sorry for the delayed response, but I was on holiday.

M.

Sep 13, 2012 at 4:44 PM

Hi Marc,

I was able to resolve the issue, however I cannot replicate it.  I had originally set several columns as indexed columns.  After reading your suggestion, I removed the index from the targeted column and it began working again.  If I reapply the index, it continues to work for now, but I have removed it altogether in case it creates an issue moving forward.  I believe this has been the only configuration change in the list, and it is currently at 486 items.

Thank you for all you do, I use many of your SP tools to enhance my work!

Chris

 

 

 

Coordinator
Sep 13, 2012 at 5:46 PM

Odd. Well, good that it's working again, anyway. And you're welcome!

M.