SPRequireUnique After Sharepoint 2010 April CU

May 28, 2014 at 7:36 PM
I am having issues getting SPRequireUnique to work after the April CU. Has anyone else faced this issue or does anyone see anything wrong with my code
$(document).ready(function() {

            columnStaticName: "User_x0020_Name",
            duplicateAction: 0,
            ignoreCase: "true",
            initMsg: "!!!",
            initMsgCSSClass: "ms-vb",
            errMsg: "You have already completed your questionnaire.",
            errMsgCSSClass: "ms-formvalidation"


I am using the latest Feb SPServices. In this same form I am using ArrangeChoices so I know SPServices is working.

Is there a way to debug?
May 29, 2014 at 1:15 PM

If you check the documentation for SPRequireUnique, "the function works only with Single line of text columns, and will generally be used with the Title column". Since your column name is "User_x0020_Name", I'm guessing it may be a Person or Group column. If that's the case, the function won't work for you as it's currently written.

May 29, 2014 at 1:49 PM
It is actually a single line of text field. I am using SPServices to lookup the username and fill that field. I chose this method because SPServices is better than Sharepoint's built in require unique IMO. This was working previously. I have only done 2 things applied the SharePoint CU from April and updated SPServices. I had to update SPServices because of the display name issue that Microsoft blessed us with.
Jun 2, 2014 at 1:39 PM
Hmm. Are you getting any script errors?

Oct 19, 2015 at 4:30 PM
I know this is an old thread and I can't find any reference to a fix but I have stumbled upon the same condition. It may be for the same reason as user "eme83." I'm storing all of my data in sub-folders in a list. The SPRequireUnique() function is not performing a recursive search for duplicates. I'm using version 2014.01. I can see on line 2605 where you make the GetListItems call but it appears its missing the argument...
CAMLQueryOptions: "<QueryOptions><ViewAttributes Scope='Recursive' /></QueryOptions>"
Without that argument, it only returns the root level of the list (nothing inside of the folders).

Oct 28, 2015 at 4:20 PM

This would probably be a good option to add to the function. I'll add it to the list for the next release.

Oct 28, 2015 at 4:21 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.