I recently got question from a follower on LinkedIn, which I thoght that the answer can be useful for more people:
I am struggling with formatting a SharePoint list lookup column. I want to make it show an icon but when I click it, it should open the lookup column value on that other list (normal lookup hyperlink behavior). I have achieved this before with text fields but never with Lookups. Any help would be appreciated!
How to use LookUp field values
If you want to use LookUp field values in SharePoint list formatting JSON, you need to access them as subproperties of the field:
Combining LookUp field values with a custom icon
As requested in the question above, you can also find the below example. In this example we generate a clickable link with an Icon, from a LookUp field that opens the list view form for the Source list.
More About This Author
SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff).
Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.
- Modern Workplace9 September 2023Using SharePoint list formatting and Power Automate to create linked items (via LookUp field) in a related list
- Modern Workplace1 September 2023Using the HTTP with Azure AD connector in Power Automate to create Planner Plans and add them as Teams tabs
- Modern Workplace26 August 2023Create an Issue Tracker App using Power Apps Copilot (Preview)