# Mega trick: Formatted tooltips for your table items (with JSON)

**URL:** <https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813>\
**Category:** Tips and Hacks\
**Created:** [February 13, 2020, 2:16pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813 "2020-02-13T14:16:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [February 13, 2020, 2:16pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/1 "2020-02-13T14:16:18Z")

</div>

Here’s a pretty neat way to render tooltips. Unlike [this solution](https://connect.superhuman.com/t/tooltip-control/7898) it doesn’t require extra rows, and unlike @Filmos’ [hyperlink hack](https://connect.superhuman.com/t/clear-tooltips-not-a-row-reference/10323) it doesn’t rely on broken hyperlinks and is much richer.

The idea:

- prepare a JSON object (text) with all the fields that you want to display in a tooltip
- render it with `ParseJson()`.

![image](https://global.discourse-cdn.com/coda1/original/2X/a/a975affb34cddf686208f61eedb3ced9337f418e.png)

The first value in the JSON will be treated as a display value and will appear as cell text, while everything else will appear when you hover it with your mouse in a popup:

![image](https://global.discourse-cdn.com/coda1/original/2X/b/bc4856ecd171c64f3383564ab4518aa6d77f6759.png)

There’s also an advanced trick: you can preserve text formatting in this object that you’re creating. To do that, replace the value in `"key" : "simple text value"` with a Coda’s internal JSON representation of a formatted column. To get this, follow [another trick](https://connect.superhuman.com/t/a-somewhat-of-a-documentation-of-hidden-formulas-added-mechanics-of-nested-buttons/9831/5) by @Filmos:

 ![image](https://global.discourse-cdn.com/coda1/original/2X/9/99037828969c8082fd47636304acca09fcf699d0.png)

By inserting it as a value in your JSON, you’ll make Coda render it recreating the formatting:

 ![image](https://global.discourse-cdn.com/coda1/original/2X/0/0882df16ff41e8f9129174f8cef91ce73484e08d.png)

Here’s the doc for you to play around:

https://coda.io/embed/YaC_Ao9u8i/_su4pO?viewMode=embedplay&hideSections=true

Don’t forget to subscribe to [codatricks.com](http://codatricks.com) — I’ll lower my standards once again this weekend and will maybe finally publish something there.

---

<div class="post-metadata">

**Author:** ![Connor\_McCormick](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@Connor\_McCormick](https://connect.superhuman.com/u/Connor_McCormick)\
**Post date:** [February 13, 2020, 4:48pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/2 "2020-02-13T16:48:21Z")

</div>

Doesn’t look like the doc is public?

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [February 13, 2020, 4:55pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/3 "2020-02-13T16:55:53Z")

</div>

Oops, seems like something changed on that front. Previously embedding automatically added “can view by link”. Fixed.

UPD: also added same formatting hack to popup content, and made column names more verbose.

---

<div class="post-metadata">

**Author:** ![Federico\_Stefanato](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/federico_stefanato/32/10092_2.png) [@Federico\_Stefanato](https://connect.superhuman.com/u/Federico_Stefanato)\
**Post date:** [February 15, 2020, 11:50am UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/4 "2020-02-15T11:50:31Z")

</div>

@Paul_Danyliuk, it’s always amusing to read (and learn from) your tips.  
Chapeau! 🎩

---

<div class="post-metadata">

**Author:** ![Andr](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/andr/32/9651_2.png) [@Andr](https://connect.superhuman.com/u/Andr)\
**Post date:** [April 4, 2020, 2:45pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/5 "2020-04-04T14:45:53Z")

</div>

Thanks for sharing your knowledge @Paul_Danyliuk , I’ve implemented your solution for a grid view for images, to show relevant information of the image when you mouse over it. [https://coda.io/@adn/imgtools](https://coda.io/@adn/imgtools)

Now I’m trying something different and I’m a bit stuck to polish it out.  
**Goal:** implement a tooltip that works as a lookup to another table.  
This is useful when you have to lookup to a lots of items from a table and don’t want to waste space by wrapping the cell to show all the content.  
**My current issue:** I want to waste less space in the tooltip, ideally it should feature a list of adjacent items, like a vanilla lookup. Now it has a column format, and it’s too much to scroll.  
If I have to be stick with the column format, at least I’d like to be able to remove the gray titles of each item, this should save up 50% of the height.  
Here’s the prototype: [https://coda.io/d/Issues-and-tests-public\_dGYEvhjpqYI](https://coda.io/d/Issues-and-tests-public_dGYEvhjpqYI)

 ![image](https://global.discourse-cdn.com/coda1/original/2X/7/7140ad2cedad92f6edd971693de86a4313cd4b32.png)

cheers

---

<div class="post-metadata">

**Author:** ![Jean\_Pierre\_Traets](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/jean_pierre_traets/32/16275_2.png) [@Jean\_Pierre\_Traets](https://connect.superhuman.com/u/Jean_Pierre_Traets)\
**Post date:** [April 4, 2020, 8:50pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/6 "2020-04-04T20:50:17Z")

</div>

Dear @Andr,

I had the chance for a quick view on mobile, it’s impressive ⚒ and looking forward to check on the desktop.

Congratulations, nice job 🥂 something you can be proud on 🏆

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [April 5, 2020, 8:17pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/7 "2020-04-05T20:17:22Z")

</div>

Don’t have the time to look very closely — but just like you’re composing a list of key:values, you can compose a simple JSON array, e.g.

```auto
{
  "Display Column":"lookup tooltip",
  "Pictures":[
    {...},
    {...},
    ...
  ]
}

```

Try that

---

<div class="post-metadata">

**Author:** ![Andr](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/andr/32/9651_2.png) [@Andr](https://connect.superhuman.com/u/Andr)\
**Post date:** [April 6, 2020, 9:33am UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/8 "2020-04-06T09:33:06Z")

</div>

Thanks a lot for the tip @Paul_Danyliuk, It works just fine!

> [@Jean\_Pierre\_Traets](#):
>
> I had the chance for a quick view on mobile, it’s impressive ⚒ and looking forward to check on the desktop.

Hi Jean, thanks!  
If you are referring to imgtools, there’s some displaying bug on mobile, that prevents the Grid View to be loaded correctly. So yes, better to check it out on desktop.

Cheers

---

<div class="post-metadata">

**Author:** ![Andr](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/andr/32/9651_2.png) [@Andr](https://connect.superhuman.com/u/Andr)\
**Post date:** [April 10, 2020, 10:12am UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/9 "2020-04-10T10:12:38Z")

</div>

I just noticed that when I changed the order of the items,  
the rendering column with ParseJSON(\_finalJson) was not updating with the new order.

I tried to use a refresh action on all the json related columns, but the new order of items was not updating.

Only thing that triggered the update was to manually delete the formula ParseJSON(\_finalJson), leaving the rendering colum blank, letting it register the blank value and then pasting again the same formula.

---

<div class="post-metadata">

**Author:** ![Carl\_Haugen](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/carl_haugen/32/20390_2.png) [@Carl\_Haugen](https://connect.superhuman.com/u/Carl_Haugen)\
**Post date:** [June 16, 2021, 6:08pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/10 "2021-06-16T18:08:24Z")

</div>

I’m trying to decode this and use it for a simple mouseover in my doc, but can’t make it work. The formula with the JSON example here has so much elements that I just can’t wrap my head around it. The other ways are not ideal either. Perhaps someone could help me in the right direction.

I’m trying to add simple icons or a text in my docs, to provide a easy way to give some help text, without it filling my entire doc. Instead of filling the document with collapsible lines with text.

The perfect way would be to add a function like a mouseover popup with text from a question mark emoji. Another alternative is a popup from a simple text, like the hyperlink examples mentioned above. The perfect solution would be if you could add a picture or a moving gif in the popup window. Like the emoji in this example, just with a quick video instead.

**Example**  
Icon in doc for mousehoover: ❓  
Popup bubble:

```auto
To complete the xxxxxx do the following.
1. Click the....
2. Select the
![giphy|480x270](upload://zETMDD5g8Ew0XoVYtRcIiwtP8fO.gif)
*not sure if you see this gif, but I hope so*

```

Any suggestions of easy popup without the need for a table?

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [June 16, 2021, 6:17pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/11 "2021-06-16T18:17:08Z")

</div>

@Carl_Haugen It’s doable but very tricky, and you’ll still need a table so that you can somewhat easily edit your help content.

I would prefer this approach though: adding a “Help” button in a page that would bring up a modal with help topics. See here at the timestamp:

[![](https://global.discourse-cdn.com/coda1/original/3X/e/c/eca5bb4d3b7eb0eed42c2dcf1fc3fc6cab0d91d9.jpeg "EasyEvents doc — final push and demo") ](https://www.youtube.com/watch?v=61ZLvb40zkE)

---

<div class="post-metadata">

**Author:** ![Carl\_Haugen](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/carl_haugen/32/20390_2.png) [@Carl\_Haugen](https://connect.superhuman.com/u/Carl_Haugen)\
**Post date:** [June 16, 2021, 7:01pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/12 "2021-06-16T19:01:14Z")

</div>

> [@Paul\_Danyliuk](#):
>
> I would prefer this approach though: adding a “Help” button in a page that would bring up a modal with help topics. See here at the timestamp:

That’s a very clever way to go about it! Thanks for the idea. It’s certainly super helpful in the scenarios where you have a longer help text or guide. I’ll try to implement it for that purpose for sure.  
It’s perhaps a bit to much of a hazel in the cases where you just need a simple line of text to explain a UI element or similar. But I could use the Hyperlink option there I suppose.

---

<div class="post-metadata">

**Author:** ![Daniel\_Stieber](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/daniel_stieber/32/17045_2.png) [@Daniel\_Stieber](https://connect.superhuman.com/u/Daniel_Stieber)\
**Post date:** [August 8, 2021, 9:02pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/13 "2021-08-08T21:02:17Z")

</div>

I’ve just implemented some tooltips and absolutely love it. One thing I noticed though is the line-break when working wirth formatted text.

The green dot uses a \_color formatting, while the black dot has no formatting.

![Bildschirmfoto 2021-08-08 um 23.00.27](https://global.discourse-cdn.com/coda1/original/3X/c/8/c82e36f54be09f14efce1f1b9e3982224eb2d032.png)

I’ve seen you have the same issue in your example “Info popup” @Paul_Danyliuk

This might easily destroy a nice layout. Any chance you found a way to get rid of that?

---

<div class="post-metadata">

**Author:** ![Daniel\_Stieber](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/daniel_stieber/32/17045_2.png) [@Daniel\_Stieber](https://connect.superhuman.com/u/Daniel_Stieber)\
**Post date:** [August 9, 2021, 7:05am UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/14 "2021-08-09T07:05:47Z")

</div>

I’ve also tried with a clipped rectangle instead of formatted text, but then I get the dots next to it, no matter how wide or small the column is. Also not what I’m looking for  
 ![Bildschirmfoto 2021-08-09 um 09.03.38](https://global.discourse-cdn.com/coda1/original/3X/a/a/aa6df6f53204d203af65f77c8bb77634ed3dbe23.png)

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [August 9, 2021, 2:15pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/15 "2021-08-09T14:15:45Z")

</div>

Try to `.Concatenate("")` it. BTW do the same for your ‘Dashboard’ button to put in on the baseline along with other buttons.

Also check out the new Object() formula to create these:

> [@How to create a 'dictionary' object? ie. list of name/value pairs](https://connect.superhuman.com/t/how-to-create-a-dictionary-object-ie-list-of-name-value-pairs/24939/2):
>
> As a matter of fact, there is an Object() formula now slight_smile It’s hidden because it’s added in preparation for a bigger update, but it’s there [image] However, there seems no “legal” way to extract a name by value yet. There’s only this \_Deref\_Object(), another hidden formula, but it cannot look into nested object (the parameter path is not really a path but only a top-level key, and you cannot chain multiple \_Deref\_Object()s): [image] [image]

---

<div class="post-metadata">

**Author:** ![Daniel\_Stieber](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/daniel_stieber/32/17045_2.png) [@Daniel\_Stieber](https://connect.superhuman.com/u/Daniel_Stieber)\
**Post date:** [August 10, 2021, 11:04am UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/16 "2021-08-10T11:04:16Z")

</div>

I think concatenate didn’t work for me, definitely played around with it (almost like the new totext() 😃 )  
I will try it with object() now.

Because you mention the Dashboard button. I had some weird behaviour there. When adding a concatenate, it cut of something from top and bottom. When I tried several things to find out why, I realized that when I do the same formula again, the next time it does not happen!

In the screenshot Test A and Test B here have the exact same button() formula, and with \_merger()+"" they also have the same JSON. I can duplicate A and it will look suddenly like B. I can move A and B around, they will stay A (wrong) and B (right)

![Bildschirmfoto 2021-08-10 um 12.54.35](https://global.discourse-cdn.com/coda1/original/3X/6/b/6b1763ec3ac1b18232891b4c54d2ef800a8aaad8.png)

So if you ever encounter this. Just duplicate 😅

---

<div class="post-metadata">

**Author:** ![Daniel\_Stieber](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/daniel_stieber/32/17045_2.png) [@Daniel\_Stieber](https://connect.superhuman.com/u/Daniel_Stieber)\
**Post date:** [August 10, 2021, 11:09am UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/17 "2021-08-10T11:09:17Z")

</div>

With Object, I can create the same, but the extra spacing and the dots are still there. With Concatenate() the tooltip is no longer available. i will try around more, maybe I find a way…

---

<div class="post-metadata">

**Author:** ![Johg\_Ananda](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/johg_ananda/32/13930_2.png) [@Johg\_Ananda](https://connect.superhuman.com/u/Johg_Ananda)\
**Post date:** [August 10, 2021, 4:00pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/18 "2021-08-10T16:00:48Z")

</div>

@Daniel_Stieber this can be fixed by selecting `Wrap Text` from `[Test A]` column menu

---

<div class="post-metadata">

**Author:** ![Daniel\_Stieber](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/daniel_stieber/32/17045_2.png) [@Daniel\_Stieber](https://connect.superhuman.com/u/Daniel_Stieber)\
**Post date:** [August 10, 2021, 4:14pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/19 "2021-08-10T16:14:05Z")

</div>

Oooh, that worked indeed! Thanks @Johg_Ananda🙌🏽

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [August 31, 2022, 6:33pm UTC](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813/20 "2022-08-31T18:33:59Z")

</div>

An update everyone — the trick still holds strong but there’s no need for tweaking on the JSON level anymore.

Here’s the new guide

> [@How to create Tool-Tip Pop-Ups (ie show additional info upon mouse hover)](https://connect.superhuman.com/t/how-to-create-tool-tip-pop-ups-ie-show-additional-info-upon-mouse-hover/33462):
>
> Hi everyone, @Paul_Danyliuk recently provided an interesting solution to the topic of Tool-Tip Pop-Ups, see the related Twitter post here: I had previously reviewed @Paul_Danyliuk’s related Community post (to be found here: [Mega trick: Formatted tooltips for your table items (with JSON)](https://connect.superhuman.com/t/mega-trick-formatted-tooltips-for-your-table-items-with-json/13813)) and found it inspiring. Based on this approach outlined by Paul, I have tried to replicate his process. As others might find this useful as well, I have compiled it into a step-by-step tutorial. Specifical…
