There are some situations where you will want to display something dynamic, like a timestamp inside a Text Area. This could be so that when you print the analysis, the timestamp is included in it. Or you may want to output an error message or return a value from either a Data Function or a Script Control. Both of these similar requirements can be accomplished in a Text Area Visualization.
Let’s first look at displaying a timestamp inside a Text Area. To do this we will add a Calculated Value from the Text Area edit ribbon.
In the Calculated Value Settings dialog, we will go to the ‘Values’ menu and then right click and select ‘Custom Expression…’.
In the resulting expression dialog, we will create the expression. For this , all we need to do us apply the DateTimeNow() function. This will return the current date and time.
The current date and time will now display in a Text Area.
A variety of modifications of this technical requirement can also be used. For example, you can have a countdown timer, using the DateDiff() function to calculate days/hours remaining to a certain event, or days/hours since a certain event.
For those developers using Script Controls or Data Functions, you can also use a Label Property Control to output content to the Text Area for the consumer to read. This could be used for things like debugging or alerting issues, or it could be used to alert the consumer when the last time the function was executed.
In this example below, we are loading data into Spotfire from TIBCO Formvine using a Script Control. We want to alert the consumer the last time the data was refreshed, so we create a Label Property Control, and then from the Script Control we output a message.