Home » Blog » SharePoint Online » How to Add a Hyperlink in SharePoint List? [Latest Guide]

How to Add a Hyperlink in SharePoint List? [Latest Guide]

author
Published By Raj Kumar
Anuraag Singh
Approved By Anuraag Singh
Published On October 4th, 2024
Reading Time 5 Minutes Reading

How to add a hyperlink in SharePoint list? It is a simple and quick process if you know the right solution. If you do not, then don’t fret. In this guide, we will discuss the complete solution for creating or adding a hyperlink to your SharePoint list.

Hyperlinks are used to improve the navigation either inside the web pages or external sources. But sometimes there might be situations in which the URL is more than 255 characters. But it is unacceptable by SharePoint. Then, what to do next?

You can use the SharePoint Column type as multiple lines of text option to add a URL of more than 255 characters. Let’s see how.

How to Add a Hyperlink in SharePoint List Using Multiple Lines of Text Option?

Follow the below steps to insert the URL of more than 255 characters in SharePoint.

1. Open the SharePoint list then click on Add Column and choose the Multiple lines of text option.

how to add hyperlink in SharePoint List

2. Assign a name to your column and then open More Options.

3. Enable the option of using Enhanced Rich Text.

4. Now paste the URL that you want to add.

5. After you get back to the list, you can see the long link along with the hyperlink icon.

PowerShell Commands to Insert a Hyperlink in SharePoint List

After loading the SharePoint CSOM Assemblies. Execute the below PowerShell commands to automate the task.

#Custom function to add column to list
Function Add-HyperLinkColumnToList()
{
param
(
[Parameter(Mandatory=$true)] [string] $URLofSite,
[Parameter(Mandatory=$true)] [string] $NameofList,
[Parameter(Mandatory=$true)] [string] $Name,
[Parameter(Mandatory=$true)] [string] $DisplayName,
[Parameter(Mandatory=$false)] [string] $Desc=[string]::Empty,
[Parameter(Mandatory=$false)] [string] $IsRequired = "FALSE",
[Parameter(Mandatory=$false)] [string] $Format ="Hyperlink"
)

#Generate new GUID for Field ID
$IDofField = New-Guid

Try {
$Cred= Get-Credential
$Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)

$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($URLofSite)
$Ctx.Credentials = $Credentials

$List = $Ctx.Web.Lists.GetByTitle($NameofList)
$Ctx.Load($List)
$Ctx.ExecuteQuery()

$Fields = $List.Fields
$Ctx.Load($Fields)
$Ctx.executeQuery()
$NewField = $Fields | where { ($_.Internalname -eq $Name) -or ($_.Title -eq $DisplayName) }
if($NewField -ne $NULL)
{
Write-host "trying to create a Column $Name already existed in the List!" -f Yellow
}
else
{
#Define XML for Field Schema
$Field_Schema = ""
$NewField = $List.Fields.AddFieldAsXml($Field_Schema,$True,[Microsoft.SharePoint.Client.AddFieldOptions]::AddFieldInternalNameHint)
$Ctx.ExecuteQuery()

Write-host "New Column has been added to your List Successfully!" -ForegroundColor Green
}
}
Catch {
write-host -f Red "Error while Adding a Column to the List!" $_.Exception.Message
}
}

$URLofSite="enter here"
$NameofList="Projects"
$Name="ProjectReference"
$DisplayName=" Project Reference"
$Desc="Enter the Project Reference"
$Format="Hyperlink" #or "Image"

Add-HyperLinkColumnToList -URLofSite $URLofSite -NameofList $NameofList -Name $Name -DisplayName $DisplayName -Desc $Desc -Format $Format

How to Add a Hyperlink in SharePoint List Having Less than 255 Characters?

If you are adding a URL that contains less than 255 characters, then you can simply follow the below steps.

1. Open the SharePoint list where you want to add the hyperlinks.

2. Hit the Add Column and select the Hyperlink option.

how to insert hyperlink in SharePoint List

3. Provide the name and Save.

4. Now, add a new entry, enter the URL of the site, and description, and Save.

5. This will redirect you to the internal webpage of the SharePoint site.

Have you ever thought about move items from one SharePoint list to another? What will be your next step to do so? Don’t worry, here is the solution.

You can use the Unfailing SharePoint Migration Tool to relocate your SharePoint list to another SharePoint list easily.

Download Now Purchase Now

Its error-free and splendid features help you to perform the task without any hindrances. This tool is designed to perform SharePoint tenant to tenant migration not only for the tech experts but also for the new tech users. It requires only some quick steps.

Step 1. Download, Install, and Execute the tool.

Step 2. Choose the required platforms and select the Sites option.

Step 3. Provide the details of the platforms.

Step 4. Add Sites and Users into the tool.

Step 5. Lastly, click on the Start Migration button to start the process.

Concluded Words

In this detailed write-up, we have discussed how to add a hyperlink in SharePoint list. All of the solutions are discussed in detail. Now, you can create a hyperlink with less than 255 characters or more than that also. Now, it completely depends upon you to choose any of the methods that can fulfill your requirements.

Frequently Asked Questions

Q1. What is the maximum length of a URL in a SharePoint hyperlink?
A – The maximum limit of a hyperlink URL is 255 characters.

Q2. How to add a URL of more than 255 characters in SharePoint?
A – To create a hyperlink having more than 255 characters, you can use the multiple lines of text option. Also do not forget to enable the Use Enhanced rich text option.

Connect With Us

+9111-28084986