Skip to content

Hyperlink Field Reference is incorrect #8629

@jackzobell

Description

@jackzobell

When I reference a hyperlink using @currentField, as instructed, I receive 2 objects.
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a", "txtContent": "@currentField.desc", "attributes": { "href": "@currentField", "target": "_blank" } }

The href equals "[object Object]" for me.

When I reference the Display Text using @currentField.desc, it works as expected. I assume that the link destination just needs to be referenced with something similar but I don't know how I would know what the .string at the end would be.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docs-commentCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devtype:archive-old-issueIssues which are closed as tool old for active work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions