Data Sources for Data Validation, DynaRanges, ComboBoxes, and ListBoxes

For Data Validation, DynaRanges, ComboBoxes, and ListBoxes, you can use several data sources, including subsets, ODBC queries, or formulas. You have to ensure that the formula result returns the same structure as e.g. subset formula, i.e. three-column matrix with element name in the first column, alias in the second and level/indent in the third.

For example, the macro function below can be used to return a source for a DynaRange. It will return a tree with Years as root node and QTR1 and QTR2 as children of it, with leaf elements Jan and Apr.

Copy
function my_dr_feeder(){
$monthDim = array(
            array('Year','Jahr',1),
            array('QTR1','Q1',2),
            array('Jan','J',3),
            array('QTR2','Q2',2),
            array('Apr','A',3)
            );

return $monthDim;
}

When used as a source of a DynaRange:

Properties of a DynaRange based on Formula

It will produce the following DynaRange when executed:

DynaRange based on Formula in a preview mode used in spreadsheet

The following example function would produce a ComboBox, ListBox, or Data Validation:

Copy
function my_cb_list_feeder(){
$monthDim = array('Year','Jahr',1,'QTR1','Q1',2,'Jan','J',3,'QTR2','Q2',2,'Apr','A',3);
return $monthDim;

Note that unlike the DynaRange example above, this function does not require an additional array inside.

Constraint for the data sources formula and ODBC query

When using a source formula or ODBC query, there is one constraint to consider. If the number of elements in the data set is divisible by three, and the last value is numeric, the corresponding process assumes it is handling a subset-like data structure. It will then only show the first, fourth, seventh, etc. element from the source data set. In some dialogs, you can select the option "Show Alias". It would then only show the second, fifth, eighth, etc. element as first alias, and the third, sixth, and ninth element etc. as second alias.

Note: in Jedox Web, the maximum result size of subsets, such as in ComboBoxes, is limited to 65,336 elements by default. This limit can be changed by adding a new entry max_result_size in the file ..\core\palo_config.xml under the section <palo_configuration>. For example: <max_result_size>256000</max_result_size>. See also: Additional Spreadsheet Server Configuration.

Updated September 27, 2022