user1866186
user1866186

Reputation: 1

managing unique values across a complete list in SharePoint

I am trying to populate unique values across a multiple columns in a SharePoint list. For example if we have "column A" with value "X", none of the columns should accept the value "x" in the entire list. Is it possible?

I tried the formula using an example. =IF([columnA]=[ColumnB],TRUE,IF([ColumnB]<>"",TRUE,FALSE)) But i felt stupid as i had no idea why i feel it is right. But it doesn't work

Any simple and better ideas will be a great help!

Upvotes: 0

Views: 696

Answers (1)

Lee
Lee

Reputation: 5493

I think you need PreSaveAction for this requirement, when item saving, the function will execute for client side validation, then you could call rest api to validate column A value and user input value, when return false, means validation failed and item will not save.

Demo thread.

https://sharepoint.stackexchange.com/questions/255633/limit-edit-in-sharepoint-list-to-only-3-items-per-user

SharePoint rest api filter.

https://www.c-sharpcorner.com/article/sharepoint-2013-using-rest-api-selecting-filtering-sortin/

Upvotes: 0

Related Questions