Is there any way to get the URL from a Link file/item on JSON Column Formatting?
When creating a Link file/item, you need to add a URL, like below, that's the one I'm looking to get on the formatting:
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityYes, it is possible to get the URL from a Link file (.url
file) using JSON Column Formatting.
You can get it using this property: [$_ShortcutUrl]
. This is an internal name of field which stores the underlying URL for your Link page/item.
Example:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "[$_ShortcutUrl]"
}
Here's the output: