Forum Discussion
SharePoint conditional uniqueness
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.
- 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-sharepoint-list-item/m-p/570774#M177374
- 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-sharepoint-list-item/m-p/570774#M177374