Forum Discussion

Rick Brock's avatar
Rick Brock
Copper Contributor
Nov 05, 2020
Solved

Need to be able to click on SharePoint list column to open form

I need to be able to click on a user in the PEOPLE column to open the form.  I'll be getting rid of the Title column and need an efficient way to open up the details for an item by clicking on it.  ...
  • ganeshsanap's avatar
    Nov 06, 2020

    Rick Brock You can use below JSON to open the default form on click of person name:

     

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "button",
      "txtContent": "@currentField.title",
      "customRowAction": {
        "action": "defaultClick"
      },
      "style": {
    	"border": "none",
    	"background-color": "inherit"
      }
    }

     

    Reference: button elements 

     

    Note: Using this JSON, you will loss the default hover action of person or group field (where you can see user details). Maybe adding some more JSON code you can achieve hover also. check above link for more information on column formatting.


    Please click Mark as Best Response 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.

     

Resources