SharePoint List: make URL in Column Description a hyperlink

Copper Contributor

Hello all,

For my Sharepoint list, I need to make hyperlinks in the description. NOTE: This works fine in Classic mode, but in Modern, the URLs no longer hyperlinks when in the New or Edit view.

 

My organization does not have access to powerapps.

 

Any ideas on how to make this work?

 

Thank you,

Spencer

 

13 Replies
A few notes:
I've tried using HTML with <a href>
I've tried creating a seperate column with the hyperlink and adding [newcolumndesc] in the description.

@specoop To add hyperlinks in text columns, you have to use the column with type "Multiple lines of text" and enhanced rich text settings must be enabled for this column: 

ganeshsanap_0-1660314039339.png


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap 

Thank you for the quick reply! I don't think I did a good job asking the question. In the edit or new view mode, I need to make the description portion of the column a hyperlink. See below!

 

ImageDesc.png

@specoop Unfortunately, this is not possible using SharePoint default capabilities as description of column simple text field which does not allow hyperlinks.

 

Only option in modern experience is to customize the list form using Power apps & add the hyperlink.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Thanks @ganeshsanap. Really wish we had licenses for PowerApps...anyone have other non-default alternatives?

It's going to be a mountain to climb if we can't somehow have a hyperlink...(NOTE: it's an older list with thousands of entries - and when we moved over to modern, the descriptions are no longer hyperlinked.

 

I guess we could use infopath, but that just sounds like a massive step backwards.

@specoop You cannot add hyperlinks in column descriptions. One workaround is use JSON formatting to add hyperlink in "Header" section of list form.

 

Example: header section of list form: 

ganeshsanap_0-1660315611450.png

 

Check this documentation for more information: Configure the list form 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Hi I am facing same problem, Have you find the good way to add the URL to description of column in modern share point without customizing by power apps?

@Tiffany_Jo Unfortunately, No. Available options to add URL in column description are still same as my answers above.

No new way introduced by Microsoft to achieve the same.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@specoop Yeah - it's a little unfortunate. I ended up creating some short URLs for my hyperlinks and telling them in the Description field to open up a new tab and then browse to that short URL. It doesn't really fit our need, but seems it's the only option.

 

NOTE: I only did a little testing on this, so it may be inaccurate, but you can add some column formatting to generate links in the answer section (not the description section) - but the hyperlink only appears after a user saves some data. It didn't work great for my column type (which was a date column - so I couldn't figure out how to add a hyperlinked area without a date) but maybe a default value (so hyperlink automatically shows) with some column formatting may fit your need? 

 

NOTE: I also tried seeing if I could add a hyperlink to the column header, but I couldn't figure it out. 

 

Really wish our organization could use PowerApps...

@specoop , @Tiffany_Jo Let me know if you need any help with adding hyperlinks to list form header or footer. You have to use the JSON for that.

 

For example: 

 

{
    "elmType": "div",
    "attributes": {
        "class": "ms-borderColor-neutralTertiary"
    },
    "style": {
        "width": "99%",
        "border-top-width": "0px",
        "border-bottom-width": "1px",
        "border-left-width": "0px",
        "border-right-width": "0px",
        "border-style": "solid",
        "margin-bottom": "16px"
    },
    "children": [
        {
            "elmType": "div",
            "style": {
                "display": "flex",
                "box-sizing": "border-box",
                "align-items": "center"
            },
            "children": [
                {
                    "elmType": "div",
                    "attributes": {
                        "iconName": "link",
                        "class": "ms-fontSize-42 ms-fontWeight-regular ms-fontColor-themePrimary",
                        "title": "Details"
                    },
                    "style": {
                        "flex": "none",
                        "padding": "0px",
                        "padding-left": "0px",
                        "height": "36px"
                    }
                }
            ]
        },
        {
            "elmType": "div",
            "attributes": {
                "class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-24"
            },
            "style": {
                "box-sizing": "border-box",
                "width": "100%",
                "text-align": "left",
                "padding": "21px 12px",
                "overflow": "hidden"
            },
            "children": [
                {
                    "elmType": "a",
                    "txtContent": "Click here for details",
                    "attributes": {
                        "href": "https://www.google.com/",
                        "target": "_blank"
                    }
                }
            ]
        }
    ]
}

 

Output

ganeshsanap_0-1662725010780.png


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Thanks @ganeshsanap!
So footer could work well, as long as we can add some if statements. With our situation, we've got about 20 different date columns that used to have hyperlinks in the description.

And only the revent ones show up based upon other selections in the list. See below for example.

=if([$Column1] == 'Yes' && [$Column2] == 'Yes', 'true', if([$Column1] == 'Yes' && [$Column3] == 'Yes', 'true', 'false')).

So we have that conditional formatting for each of the 20 or so date columns.

Any way we could dynamically only have certain columns appear in the footer (that are hyperlinks)? I know it's much harder here compared to PowerApps, but this is what we've got access to.

Thanks again,
Spencer

@specoop Yes, you can create multiple hyperlinks in header/footer and show/hide them based on conditions. Here's an example you can refer & build JSON for your requirements accordingly: 

 

{
    "elmType": "div",
    "children": [
        {
            "elmType": "a",
            "txtContent": "Link 1",
            "style": {
                "display": "=if([$Column1] == 'Yes' && ([$Column2] == 'Yes' || [$Column3] == 'Yes'), 'block', 'none')"
            },
            "attributes": {
                "href": "https://www.google.com/",
                "target": "_blank"
            }
        },
        {
            "elmType": "a",
            "txtContent": "Link 2",
            "style": {
                "display": "=if([$Column5] == 'True value', 'block', 'none')"
            },
            "attributes": {
                "href": "https://www.google.com/",
                "target": "_blank"
            }
        },
        {
            "elmType": "a",
            "txtContent": "Link 3",
            "style": {
                "display": "=if([$Column6] == '', 'block', 'none')"
            },
            "attributes": {
                "href": "https://www.google.com/",
                "target": "_blank"
            }
        }
    ]
}

 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.