在SharePoint中的完整列表中管理唯一值

时间:2019-07-15 14:38:15

标签: sharepoint-2013 custom-lists

我正在尝试在SharePoint列表的多个列中填充唯一值。例如,如果我们的“列A”的值为“ X”,则在整个列表中,所有列都不应该接受值“ x”。 有可能吗?

我使用一个示例尝试了该公式。 = IF([columnA] = [ColumnB],TRUE,IF([ColumnB] <>“”,TRUE,FALSE)) 但是我感到很愚蠢,因为我不知道为什么我觉得这是对的。但这不起作用

任何简单更好的想法都会有很大帮助!

1 个答案:

答案 0 :(得分:0)

我认为您需要PreSaveAction来满足此要求,在保存项目时,该函数将执行客户端验证,然后您可以调用rest api来验证列A的值和用户输入值,如果返回false,则表示验证失败并且项目将不会保存。

演示线程。

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

SharePoint REST API筛选器。

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