A Text Display has a formula and a procedure. How do I use the result of the formula in the procedure?
For instance, using literal mode and the formula http://www.example.com/«id» to display an integer field, how can I pass the result to openurl( when the text is clicked?
It’s definitely more difficult than it should be, but it is possible. Here is code that can be triggered by a Text Display object in literal mode, at the end, displayedtext will contain the text that is displayed (I just tried it and verified that it works). This code displays the value with the message statement, but you could use openurl or whatever you want.
let tformula = objectinfo("formula",info("clickedobjectid"))
local displayedtext
formulamerge tformula,displayedtext
message displayedtext
Note that a slightly different program would be required if the text display object used formula mode, like this:
let tformula = objectinfo("formula",info("clickedobjectid"))
let displayedtext = formulavalue("",tformula)
message displayedtext
Of course you could use objectinfo( to figure out which mode was being used and trigger the appropriate code.
Since Panorama already knows what this value was, it would be nice if there were a simpler way to determine this value. I’ve put this on the to-do list.