How to Edit Data Functions


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 in your analysis, if you run it multiple times, but the only time you would actually need that is when you run the data function with different inputs, and you want to use or keep all of the different outputs. An already added instance can be edited, for example, if you need to change an input to a different type or value. Most parts of the data function can be edited from the Data canvas, but for some types of editing, you must use the Data Functions Properties dialog.

To refresh a data function instance in an analysis:

If you have added a data function to your analysis and the underlying data has been changed, you can update the calculation using the same settings as last time.

  1. On the authoring bar, click Data canvas .

  2. Locate the data function instance that you want to refresh. Use the search field in the top-left selector if you have many data tables or data functions in the analysis.

    Comment: You can also refresh the data function instance using the Data Function Properties dialog.

  3. Click Refresh.

To edit mapped data function inputs:

  1. On the authoring bar, click Data canvas .

  2. Locate the data function that you want to edit. Use the search field in the top-left selector if you have many data tables or data functions in the analysis.

  3. Click the round settings button (Edit data function inputs) to the left of the fx node.

  4. Make your changes in the Configure data function flyout and click OK.

Tip: You can sometimes also tweak inputs from visualizations where the data function outputs are used. See Interactive Tuning of Data Functions.

To edit a mapped data function output:

If you have added an output result to the wrong data table, or to the wrong document property, you can reconfigure the output from the data function view in the data canvas.

Note: Remember that changing outputs that are used in data tables can severely affect the final content of the data tables, because all structural changes will be applied to the end of the data table source tree.

  1. On the authoring bar, click Data canvas .

  2. Locate the data function that you want to edit. Use the search field in the top-left selector if you have many data tables or data functions in the analysis.

  3. Click the round settings button (Configure the output) to the right of the output parameter that you want to reconfigure.

  4. Response: The Configure data function output flyout is displayed.

  5. Specify what to do with the output parameter, and then click OK.

    Comment: For a description of the available input and output types, see Configuring Data Function Parameters.

    Response: The function is executed. Depending on how the output parameters were set up, you may get a new or updated data table, new columns or rows, or an updated data table, column, or document property, which can be used to control a variety of settings in your analysis.

To remove a previously inserted data function instance from the analysis:

  1. On the authoring bar, click Data canvas .

  2. Locate the data function instance that you want to remove. Use the search field in the top-left selector if you have many data tables or data functions in the analysis.

  3. Click Delete.

    Response: The data function instance is removed from the current document but any outputs that were added (columns, data tables, document properties, etc.) will remain until you remove those manually.

To sync a data function with the library:

If a newer version of the data function definition used in the document is available in the library, you can sync to update the data function instance in the analysis with the changes in the library.

  1. On the menu bar, click Data > Data functions properties.

  2. Click to select the function of interest in the Data functions in current analysis list.

  3. Click Sync from Library.

  4. Click Close.

To delete a saved data function definition from the library:

If you are a data function author who create data function definitions for others, you might want to remove old data function definitions from the library, as you create newer or better ones.

  1. On the authoring bar, click Files and data .

  2. Locate the data function of interest.

    Comment: You can use the search field at the top of the flyout to locate the data function. (Use 'type:datafunction' as the search expression in the search field to find all data functions, and limit further using text in the name.) See Searching the Library for more information about search expressions.

  3. Click on the menu next to the data function in the list and select Delete.

    Response: A dialog asking you if you are sure you want to delete the data function is displayed. Click Yes and the data function is removed.

Tip: If you have administrative rights you can also delete a data function using the Library Administration tool.

To edit the name, description or keywords of a saved data function in the library:

  1. On the authoring bar, click Files and data .

  2. Locate the data function of interest.

    Comment: You can use the search field at the top of the flyout to locate the data function. (Use 'type:datafunction' as the search expression in the search field to find all data functions, and limit further using text in the name.) See Searching the Library for more information about search expressions.

  3. Click on the menu next to the data function in the list and select Edit properties.

    Response: The Edit Properties dialog for the selected data function is displayed.

  4. Change the properties for the data function and click OK.

Tip: If you have administrative rights you can also edit the name, description and keywords of a data function using the Library Administration tool.

To recreate a deleted result column:

If you run a data function that creates one or more columns, and then you delete one of the result columns from the analysis, the lost column remains deleted if you refresh the data function.

To recreate the lost output, edit the data function output mapping from the data canvas. This will rerun the data function and add the output result as specified.

To change settings for a saved data function instance in an analysis, using the Data Function Properties dialog:

In the Data Function Properties dialog you can edit all parts of the data function.

Note: Remember that changing outputs that are used in data tables can severely affect the final content of the data tables, because all structural changes will be applied to the end of the data table source tree.

  1. On the menu bar, click Data > Data functions properties.

    Response: The Data Function Properties dialog is displayed and all data function instances that have been executed in the analysis are shown in the Data functions in current analysis list.

  2. Click to select the function of interest in the Data functions in current analysis list.

  3. Click Edit Parameters.

    Response: The Edit Parameters dialog is displayed.

  4. If desired, change whether to Refresh function automatically.

  5. Change the Input parameter settings, and/or the Output parameter settings, and click OK.

    Response: The data function instance is updated using the new settings.

  6. Click Close.

To sync a data function with the library:

If a newer version of the data function definition used in the document is available in the library, you can sync to update the data function instance in the analysis with the changes in the library.

  1. On the menu bar, click Data > Data functions properties.

  2. Click to select the function of interest in the Data functions in current analysis list.

  3. Click Sync from Library.

  4. Click Close.

To remove a previously inserted data function instance from the analysis, using the Data Function Properties dialog:

  1. On the menu bar, click Data > Data functions properties.

  2. Click on the data function instance you wish to remove.

  3. Click Delete.

  4. Click Close.

    Response: The data function instance is removed from the current document but any outputs that were added (columns, data tables, document properties, etc.) will remain until you remove those manually.

See also:

What are Data Functions?

How to Use a Data Function

How to Register a Data Function

Details on Register Data Functions

Pinning Data Functions to the f(x) Flyout