
Hi @Greg Spinks ,
Per my test, the following Json code can be used in a column alone.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"href": "='tel:' + @currentField"
}
}
But when I set the conditions, the effect is not very good, it cannot be performed as expected. You can use this method as a workaround first, I will continue to do some research, and I will update it as soon as there is any progress.
Thanks for your understanding!
Updated on 3/15/2023
You can use this code make conditions.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"href": "=if(indexOf(@currentFeild, '@')<0, 'tel:' + @currentField, ' mailto:' + @currentField)"
}
}
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.