Hi @Tevon2.0 ,
Set the Home Phone column in the format of (000)-000-0000, which can be achieved through JSON format:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "a",
"style": {
"padding-right": "8px",
"display": "=if(indexOf(@currentField,'@') > -1, 'block','none')"
},
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href": {
"operator": "+",
"operands": [
"mailto:",
"@currentField"
]
}
}
},
{
"elmType": "span",
"txtContent": "=if(indexOf(@currentField + '^', '^') == 10,'('+substring(toString(@currentField),0,3)+') '+substring(toString(@currentField),3,6)+'-'+substring(toString(@currentField),6,10),if(indexOf(@currentField + '^', '^') == 7,substring(toString(@currentField),0,3)+'-'+substring(toString(@currentField),3,8),@currentField)",
"attributes": {
"class": ""
}
}
]
}
The steps to set the Home Phone number must be exactly 10 digits are as follows:
List settings->Validation settings->=LEN([Home Phone])=10
In this way, at the same time, the Home Phone column can be set in the format of (000)-000-0000 and the length of the restricted number must be 10.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.