SPServices.SPRequireUnique Automatically launch edit mode?

Oct 14, 2010 at 2:14 PM

Marc or anyone else in the knowing... If SPRequireUnique finds a matching value in the list is it possible to have an alert pop up and offer the option to edit the existing entry?



Oct 14, 2010 at 2:55 PM

I am sure that would be something that could be done. However, you may want to ensure that the user could actually edit the existing entry. Just a thought!

Oct 15, 2010 at 2:51 AM


The approach I took on this is to prevent the new, duplicate item from being created. My initial use case was creating referencial lists, like one containing States or Contries, where you wouldn't want the same value in the list twice.

I'm sure you could exptend the function to aloow the user to edit the existing entry. I'm not sure I see a use case there, though.


Oct 20, 2010 at 1:04 PM


I'm trying to extend the functionality of the function and make a list "user" proof so to say. I can pass an alert during the duplicate msg handling where you change the attr to disabled on the OK button. I would like to be able to pass a Confirm() with the OK button linked to the editform via href and automatically pass the url with the uniqueid. Just a little stuck here my dev skills are a little rusty... Any help or suggestions are greatly appreciated!

My best,


Oct 20, 2010 at 5:53 PM

If you could post your existing code, maybe I could help.

What you're trying to do might actually be a nice enhancement to SPRequireUnique. What I'm thinking is that I'd optionally append a link to the errMsg ("This value is not unique." by default) to the duplicate item.


Oct 20, 2010 at 5:54 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.