0

I created a custom list and kept the "Title" as unique and required.

  • When I use the ListFormWebPart in "NewForm.aspx" all the validations work fine, i.e. for required and dulicate entry it shows the validation messages.

  • But for DataFormWebPart, created via SharePoint Designer 2010 or out of the box for the same list, the required validation works but the unique does not work as expected and throws the asp.net default exception web page showing the following error: The list item could not be added or updated because duplicate values were found in the following field(s) in the list: [Title]


Note: The ListFormWebPart is the default "NewForm.aspx" and the DataFormWebPart is created by default in the customNewForm.aspx added via SPD 2010


I have not changed anything in the new custom form and i need to make the custom form. Do i need to do any other thing specifically to get this validation working?

0

I could not solve the problem but came up with a work around for the problem:

Since, i was making a custom form and making changes in that; the validation for uniqueness was not triggering.

So, in the default new form I made all the custom design changes via Jquery rather changing them directly in the form (as ListFormWebPart cannot be edited via sharepoint designer) and everything seems to work fine now.

  • You could also use a query of the list to check for uniqueness in the form controls as an alternative workaround. – ghangas Jul 3 '15 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.