Data function properties
When a data function has been executed in an analysis, it is stored in the document as a data function instance. You can have multiple different instances of the same data function definition in your analysis, if you run it multiple times. An already added instance can be edited, for example, if you need to change an input to a different type or value.
In this dialog you can change both the input and output handlers, sync data functions with updates in the library, or refresh calculations if anything has changed.

| Option | Description |
|---|---|
| Data functions in current analysis | Lists all data function instances that
have been added to the current analysis. Note that if a previously used data
function has been replaced by a subsequent data function, and all outputs from
the first data function have been removed, then the first data function no
longer remains in this list.
Each time you execute a data function definition, it becomes a new instance in the document. For performance reasons, new instances should only be added to a document when necessary, for example, because you need multiple results from a data function definition, based on different input values. If you just want to update a previously executed instance, click on it in the list and click Edit Script, Edit Parameters, Refresh, or Synch from Library, to get an updated instance. You can also edit the instance from the Data canvas. The list contains information about the name, path, type of function and the run location (which might be local or remote). Click on a header in the list to sort by that column. |
| Register New | Opens the
Register Data Functions dialog where you
can
create and register new data function
definitions.
Note: You cannot create any Statistica data functions using the
Register Data Functions dialog. See the
Spotfire Integration with Statistica for
more information on how to work with these type of data functions.
|
| Copy | Opens the Register Data Functions dialog where you can create a new data function definition based on an already existing data function definition that has been used in the analysis. |
| Insert | Opens the
Data Functions - Select Function dialog
which lists data function definitions available in your library, that you can
select, edit, and map to your analysis.
Note: To add Statistica data functions you must have the
Spotfire Data Science license, and the
Add and configure Statistica data
functions license feature must be enabled.
|
| Edit Script | Opens the Edit Script dialog where you can edit the data function definition (the script and its parameters) for the selected instance. |
| Edit Parameters | Opens the Edit Parameters dialog where you can change the configuration and edit the mapping of input and output parameters for the selected data function instance. |
| Delete | Deletes the selected data function
instance from the analysis.
You can also delete data function instances from the data canvas. |
| Refresh | Refreshes the data function calculation in
your analysis, so that any changes to the input values are reflected in the
output results.
You can also refresh data function instances from the data canvas. |
| Sync from Library | Makes the document use an updated version
of the selected function definition if a newer version is available in the
library.
Note: Synchronizing is possible only for data functions that
have been saved to the library and added from the library. The
Sync from Library button is
unavailable for unsaved data functions run from the
Register Data Functions dialog. If the
analysis is expected to have a long life span, it is recommended to keep only
saved data functions in the analysis, so that they can be updated.
|
| Save to Library | Opens the Save as Library Item dialog, which allows you to save a selected data function definition to your library. |
| Export to File | Opens a Save as dialog, which allows you
to export the selected data function definition and save it as an
.sfd file on your computer.
The export option makes it possible to share data function definitions between different systems. |
On the Expression Function tab, you can define an expression function to save and reuse a Spotfire® Enterprise Runtime for R (a/k/a TERR™) script within all kinds of expressions in the analysis.
- Creating an expression function
You can use the Expression Function dialog (reached from Data Function Properties) to register a function in the Spotfire expression language that is based on Spotfire® Enterprise Runtime for R (a/k/a TERR™). Once an expression function has been created, it is automatically available as any other function in the Spotfire expression language, within the current analysis. - Data Functions - Select Function
The Data Functions - Select Function dialog is used select which data function in the library to execute. The data functions are organized by the keywords entered while saving them to the library. A data function can show up in several different groups if it has multiple keywords. Data functions without keywords are only placed in the default (All) group. - Syncing a data function instance with the definition in the library
If a newer version of the data function definition that was used in the document is available in the library, you can sync it from the Data function properties, to update the data function in the analysis with the changes made in the library.