Product: TIBCO Spotfire®
How to automatically set a property value to the current date/time.
It is useful to have a property (document, data table, column) that is updated with the current date/time when the report is opened. One way this can be accomplished is by using a data function to update the property when the report is opened.
Create a data function that outputs the system time to a document property. For example, a document property named 'CurrentDateTimeProperty'. This data function will execute automatically when the report is opened and updating the property value.
The data function can be created here:
- Edit > Data Function Properties > Register New...
See the reference How to Use Data Functions for the detailed description of creating and managing data functions
Data Function Details:
output <- Sys.time()Output parameter:
- Name: output
- Type: Value
- Output: Document property:CurrentDateTimeProperty
Since this uses a data function as the trigger, this requires a statistics engine to work. TERR is included in the Professional/Analyst/Desktop Client, so there are no additional requirements for this to work in those clients. For this to work on Web Player, you need to configure Spotfire to point to a TIBCO Spotfire Statistics Services (TSSS) server instance. This TSSS URL must be configured here according to the Configuring TIBCO Spotfire to use TIBCO Spotfire Statistics Services reference.
Example:See the attached (Filename: Automatically set property to current date time.dxp). Requires Spotfire version 6.5 or higher. Doc: How to Use Data Functions
Doc: Configuring TIBCO Spotfire to use TIBCO Spotfire Statistics Services