I have created a dashboard to give me a quick status of my project. In the dashboard, I have some agents that I want to see a glance of their content. But, if I use the Summary Table method, then these notes are too big and stop serving their purpose of simple indicators. Therefore, I wish to display the $DisplyName of the notes collected by the agent using the Hover method of the agent. How can it be done?
Set the $HoverExpression attribute of the agent – or of any other note you want to configure hover expressions for. This can be set in the Hover tab of the Text Inspector. Recall that this is an expression – see examples here.
I know that the expression should go in the $HoverExpression, but I can’t figure out the right syntax for that expression.
Here’s very simplistic example.
Hover Expression Test 20190105.tbx (59.9 KB)
Your $HoverExpression is not working when I put it in the agent’s $HoverExpression. Do I have to make a note that finds the notes inside the agent, and then have the find note $HoverExpression set?
I don’t have your document so I cannot answer that. Why would you create an agent to look inside an agent?
However, I provided a sample document and you will see that the $HoverExpression shown in the image above IS the agent Find Flora’s $HoverExpression. In other words, it works. The example expression is generic and could be copied from the sample file to any other agent.
OK. Don’t know why it didn’t work the first time I tried, but it works now! Thanks again, Paul.
Now it is working, a couple of relevant points to consider - size and scale.
Size. As @PaulWalters’ kind demo shows, you can make a listing in a hover panel. Bit, note: it’s not designed as a table so you’ll have to do all the formatting for that and at some point your data may overflow the panel. IOW, the panel may prove insufficiently big. Why? Simply, I’d suggest it wasn’t designed with very large data display in mind. If you find you need to display more info than it supports you may need to make a feature request.
Scale. As a general premise, is you use display/hover expressions with a lot of calculations, they don’t scale well - i.e. if lots of notes use the code. The step at that point is to use a rule (or if possible, an edict) to generate the output string and store it in a user attribute. Then, use the latter as the DE/HE expression. This way the computation occurs before the DE/HE is called and it simply has to show a simple string.
Here’s an example of @mwra’s two points.
- The agent on the left hand (on the map) uses a Summary Table instead of a hover expression. The hover display will grow to an unreasonable size after about 5 to 10 new notes are found by the agent.
- The agent on the right hand (on the map) uses the technique Mark suggested to generate the output string for the hover expression in a string then call that string in $HoverExpression. Here we have a user String attribute $ChildNames that the rule for the right hand agent files with the data, and then $HoverExpression consists merely of $ChildNames. Same result, different approach. To save computation load you could use a Stamp instead of a Rule.
It is not obvious in the image, but in the KA list $ChildNames has the full content shown in the hover, but since KAs truncate lines 2 and following, the result is merely not shown in the KA list.