unique values for multiple columns SHAREPOINT LIST

Ciprian Popovici 1 Reputation point
2021-05-06T09:51:07.39+00:00

Hello,
I need to enforce unique values for some columns in a Sharepoint list but cannot find a solution that is working. This columns are formatted as Date and as Person. OOTB permit only one column at a time to be unique.
I find an article bellow using this javascript code that is placed on the newpage.aspx but cannot make it work.

This is the code that i try to modify , from site bellow. I also made a list with exact this fields ,but it's not working. Can you tell me what i do wrong?

https://www.codeproject.com/Tips/1205585/Unique-Entries-Based-on-Multiple-Columns-in-Sharep?fid=1926122&df=90&mpp=25&sort=Position&spc=Relaxed&tid=5722003

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,657 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-05-07T03:04:47.163+00:00

    Hi @Ciprian Popovici ,

    The code in that article only works for single text type columns. You can noticle that columns(Title,Name,Email) used in the aritcle are all text type. While you are using Darte cloumn and Person column. These type columns will not work with the code.

    So, you have to change your columns to text type to use the code. Otherwise, you have to use the OOTB that permit only one column at a time to be unique.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.