Configuring Data Function Parameters


When you run a data function, you must define how the input and output parameters of the data function definition should be handled within your analysis. It is necessary to specify a mapping of all required parameters to Spotfire, to use the data function in an analysis. This configuration can be done, either in the flyout when running a data function from the Files and data or the f(x) flyout, or (in the installed client only), from the Edit Parameters dialog which you can reach from Data > Data function properties, or when creating and testing data functions using the Tools > Register Data Function dialog.

Note: All of the required inputs and all outputs must be configured to run the data function. Optional inputs can be left without being configured, Optional outputs can be excluded from the summary view when running the data function from or , or left on None in the Edit Parameters dialog, but at least one output is needed.

General configuration

Inputs

If the data function is designed to use input parameters to determine on what to base the calculation, you must configure your inputs.

For example, this could be a value, a column or a data table that you select from your analysis. Not all data functions require inputs, and there might also be cases where optional inputs can tweak the result from the calculation. It is the author of the data function that determines what you need to provide, by specifying the input type and what is required.

Tip: If there are many inputs in your selected data function, and only some of them are required, you can click Always show required inputs first to move optional inputs to the end of the list and hide them, when running the data function from or .

You will not be able to select from all of the input types described below when specifying the input for a selected parameter; you only see options that are applicable to the current data function and your analysis.

The Limit by option allows you to limit the calculations based on column values or data tables to rows matching a specified combination of filterings and markings only. If more than one option is selected, then calculations will be performed for rows matching the intersection of the selected filtering and markings only. Do not add any limits to base calculations on all rows.

Tip: When a data function instance has been added to an analysis once, and the outputs are columns or rows used in a visualization, you can tweak your input values directly from the visualization context, and try out the effect of different input values. You can also edit input and output parameters from the Data Functions in the Data Canvas view.

Outputs

The configuration of outputs determines what to do with the result from the calculation. For example, you might get a new data table, new columns or rows, or, a document property value that can be used to define a line in a visualization, or similar. Which types of output are available depends on what your selected data function produces (Value, Column or Table), and what you currently have in your analysis. For example, if you do not have a data table in your analysis when running the data function, the only option you will have is to add a new data table. Once you have a data table, more options can become available.

See also:

What are Data Functions?

How to Use a Data Function