SOLVED

SharePoint conditional uniqueness

Copper Contributor

Hi All,

 

I have a question about implementen custom column/list validation in SharePoint.

I have 2 columns that are important for validation. First one is the name, second one is the code connected to that name.

I want the user to be able to add new items to the list, where the name is free (no restrictions) but I want the code connected to it to be unique, but only if the name is different. So if a user adds the same name twice, I want it to be okay to use the same code (in fact is has to be the same). But if a different name is entered with the same code, I want it to give an error.

Below I have tried to visualize what I want to achieve, but I can't seem to find out how in Sharepoint.

 

Name

Code

Result

Name A

1010

TRUE

Name A

1010

TRUE

Name A

2020

FALSE

Name B

3030

TRUE

Name B

1010

FALSE

 

If anyone has any suggestions, I would love to hear them.

1 Reply
best response confirmed by M1keG (Copper Contributor)
Solution
SharePoint can't do this sort of validation unless you customise the form using PowerApps.
https://powerusers.microsoft.com/t5/Building-Power-Apps/Validate-powerapp-form-field-against-sharepo...
1 best response

Accepted Solutions
best response confirmed by M1keG (Copper Contributor)
Solution
SharePoint can't do this sort of validation unless you customise the form using PowerApps.
https://powerusers.microsoft.com/t5/Building-Power-Apps/Validate-powerapp-form-field-against-sharepo...

View solution in original post