Sharepoint - Call hyperlink

Ethan Hoare 0 Reputation points
2023-12-18T02:28:57.1966667+00:00

Hi there,

I am wanting to create a share point list for contact management that will include a tel: hyperlink as a button. I can only find how to create a hyperlink button for a website etc.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,946 Reputation points Microsoft External Staff
    2023-12-18T08:31:44.64+00:00

    Here are JSON codes for you refer to:

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "a",
      "style": {
        "font-size": "17px",
        "font-weight": "bold",
        "width": "150px",
        "display": "flex",
        "justify-content": "center",
        "text-decoration": "none",
        "border-radius": "10px",
        "margin": "10px"
      },
      "attributes": {
        "class": "ms-bgColor-themePrimary ms-fontColor-white",
        "href": "= 'tel:' + @currentField",
        "target": "_blank"
      },
      "children": [
        {
          "elmType": "span",
          "style": {
            "margin-right": "10px"
          },
          "attributes": {
            "iconName": "Phone"
          }
        },
        {
          "elmType": "span",
          "txtContent": "@currentField"
        }
      ]
    }
    

    Result:

    enter image description here


    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.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.