I would be grateful for guidance please regarding the following goal. I have a map that shows notes with a $Prototype setting to show that they are a vendor partner. The prototype Vendor notes’ attributes include 2 regarding revenue:
an attribute called $HistoricalRevenue with a numeric value equal to the cumulative revenue generated by that vendor partner to date; and
an attribute called $ExpectedRevenue with a numeric value of forecast revenue.
I’d like to have this historical numeric value display when I hover the mouse pointer over the note and to have the note $Name display the $ExpectedRevenue value directly after it in the map view (perhaps separated by a colon). Might someone be able to show the action code needed to achieve this please? Cheers, J
The Inspector—in this case the Text Inspector’s Hover tab offers a reasonable size box for entering the expressions. But, if the expression code needed is long, a further approach to the above is to give your ‘example’ note the (built-in) prototype “Code” and put the expression’s code into the note’s $Text. The prototype ensures normal $Text behaviours like making straight quotes aren’t automatically translated into curly ones—nicer to read but which don’t have the same meaning in action code. Taking such an approach the example above would then become:
$HoverExpression=$Text(/configuration/example)
The ‘example’ can be any note. The choice of source here is just by way of explanation.