Skip to main content
Skip table of contents

Multiple connections per formula

Overview

This feature allows users to retrieve and combine data from multiple connections directly within supported Velixo functions. You can simply use a Velixo filtering expression (for instance, * for all available connections) or specify a 2D array for the ConnectionName argument to aggregate results using one of the following modes:

  • sum - for retrieving totals for multiple connections

  • average - for retrieving averages for multiple connections

  • min / max - e.g., for performance comparison

  • stack-horizontally - e.g., for data reconciliation/comparison

  • stack-vertically - e.g., for retrieving exhaustive lists of objects (can be combined with SORT(UNIQUE(...)))

  • concat

This functionality supports a range of scenarios, including consolidating financial data across companies, merging lists, or combining data from multiple environments. For instance, you can get the turnover by specific account for all connections in the workbook, or get all projects for connections whose names start with 'Construction'.

Writeback-based functions, and functions that leverage Table Mirroring do not support this feature.

You can leverage the VX.SETTINGS function to construct a 2D array with the parameters listed below.

Parameters

Parameter

Required / Optional

Description

Connection

Required

Velixo range expression containing connection names.

AggregationMode

Optional

Aggregation mode selection.

Valid values: sum, average, min, max, concat, stack-horizontally, stack-vertically

Default value: stack-horizontally

GlobalAggregation

Optional

If TRUE, then sum, average, min, max, and concat collapse all values, including dynamic-aware results of individual functions.

Example: You run three connection-scoped functions, each returning 100 values. If you specify sum with GlobalAggregation = TRUE, you will get the total sum of all 300 values instead of the default spill range.

Default value: FALSE

CaseInsensitiveAggregation

Optional

Specifies whether to compare normalized (lowercase) or original strings in min and max modes.

Default value: TRUE

TrimmedAggregation

Optional

Specifies whether whitespace surrounding the strings should be ignored in comparison in min and max modes.
The function returns original values regardless of the setting.

Default value: TRUE

ConcatSeparator

Optional

Defines a separator character for the concat aggregation mode.

By default, the separator defined in the Options menu is used.

IncludeConnectionName

Optional

If TRUE, in the stack-horizontally mode, adds a row with connection names above the returned datasets. In the stack-vertically mode, it adds a column containing connection names. Ignored in other modes.

The connection name appears only once per dataset, then empty rows/columns are output until the connection changes.

image-20251007-135038.png

If the data set for the connection is empty, a row/column with the connection name is still displayed.

When working with a single connection, the connection name will not be displayed.

Default value: TRUE

StrictErrorMode

Optional

If set to FALSE, and the function returns an error for a specific connection and input value, handle it depending on the aggregation mode and the output value type:

  • for sum, average, min, max: replace the invalid value with one of the following, “neutral” values:

    • 0 for a number,

    • FALSE for a boolean,

    • '1900.01.01' for a date,

    • '' for a string

  • for concat: replace the invalid value with an empty string

  • for stack-horizontally, stack-vertically: a replace the invalid value with a 1x1 empty array.

If set to TRUE, and the function returns an error for a specific connection and input value, error is returned in the aggregated function output for this particular value.

Default value: TRUE

The following Drilldown-related scenarios are currently not supported or limited:

  • Drilling into the Excel sum of results stacked horizontally or vertically

  • Drilling into results stacked horizontally or vertically in case of multi-column and/or multi-row results

  • Drilling into the sum of results with the GlobalAggregation parameter set to TRUE in case of multi-column and/or multi-row results.

Examples

All connections in the workbook, sum aggregation mode

The function in this example uses a range named “Connection" as the function’s ConnectionName argument.

image-20251127-170021.png

The Connection parameter in the connection name is set to * - a Velixo filtering technique that returns all possible values, in this case, connection names.

The AggregationMode is set to sum.

The resulting ConnectionName argument is equivalent to the following 2D array:

CODE
{“Connection“, “*“; “AggregationMode“, “sum“}
image-20251127-170307.png

As a result, the function returns a summary of values for all connections active in the workbook.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.