Text Hover Over only works if Column is Showing (not hidden)

Brass Contributor

Hi!

 

I've created a risk tracker for my team and have it set up so that risk is reflected using icons / colour coding. What I've also done is captured the description of risk which I then show using the following code on hover over:

 

  "customCardProps": {
    "openOnEvent": "hover",
    "directionalHint": "rightCenter",
    "isBreakVisible": false,
    "formatter": {
      "elmType": "div",
      "style": {
        "font-size": "12px",
        "display": "block",
        "margin-left": "auto",
        "margin-right": "auto",
        "width": "180px",
        "padding": "4px"
      },
      "txtContent": "[$ResourceRiskDescription]"
    }
  },

 

But what I've found, is that the hover over only populates with the text if I've got that column "Resource Risk Description" showing in my view. The whole point of the hover over is so that I can hide the column in the view and show only my icons. Anything wrong with my code?

1 Reply

@Ann-Margaret There is nothing wrong with your JSON code. This is a known limitation of SharePoint JSON formatting.

You have to include the column in list/library view in order to reference the column in JSON using [$InternalName] format.


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