Forum Discussion

kbjbd's avatar
kbjbd
Copper Contributor
Aug 11, 2025

SharePoint list validation

Hi! This is my first post in this community. I am looking forward to have your expert opinion regarding list validation.

 

I have a list where there are two columns named "Apps" & "UserID". 

"Apps" column having three choices like "ABC" or "MNO" or "XYZ"

UserID is different for those three apps like;

For ABC: DBXXXXX1 or DBCXXXX1

For MNO: EFO-XXXXX1

For XYZ: mailto:email address removed for privacy reasons

We would like to restrict the input of UserID based on the selected Apps and try to use the following formula in list validation but getting error

 

=IF([Apps]="ABC", AND(OR(LEFT([UserID],2)="DB",LEFT([UserID],3)="DBC"),LEN([UserID])=8),IF([Apps]="MNO",AND(LEFT([UserID],4)="EFO-",LEN([UserID])=10),IF([Apps]="XYZ",AND(ISERROR(FIND(" ",[UserID])),ISNUMBER(FIND("@",[UserID])),ISERROR(FIND("@",[UserID],FIND("@",[UserID])+1)),ISNUMBER(FIND(".",[UserID],FIND("@",[UserID])+2)),FIND(".",[UserID],FIND("@",[UserID])+2)<LEN([UserID])) 

 

Would anyone please suggest the right way of doing the list validation.

2 Replies

  • Hi kbjbd​ 

     

    have you tried Power Apps? I think with a Power Apps form you are more flexibel and it's simplier to use field validations.

     

    Best, Dave

Resources