RDB

This function returns values from a relational list that has been created with a SQL query.

Syntax

=RDB(HYPERBLOCK("hyperblock_name"),row_index,"column_title")

Using RDB inside hyperblock

The contents of relational databases are displayed on the spreadsheet using hyperblocks and SQL queries.

Drag a relational list from the Database Structure to create a hyperblock. Select the value cell and open the Edit OLAP Formula dialog. Select Relational Values as the formula type.

In the Database section, select the table and column of the relational database. The RDB formula is displayed in the OLAP formula field.
Note: Only data fields selected in the SQL query can be displayed by the RDB formula.

Using RDB outside hyperblock

Select the value cell and select Insert function > Special > RDB.

Specify this information:
Name
Specify a hyperblock name
row_index
Specify a record or row reference.
column_title
Specify the name of a column from which the value is displayed.
Use line number
Set to TRUE to generate row index numbers as unique name of a record.
Note: The relational database does not use unique name. The unique name is generated from first column of relational table. In this case, record reference is the value of that unique name. Behavior of this record reference can be changed in Advanced settings of hyperblock.

The SQL table example

ID Name ElementType OrderPosition DataSourceID
Variance Variance NULL 2 NULL
Actual Actual NULL 1 NULL
Budget Budget NULL 1 NULL
Simulation Simulation NULL 2 NULL
Forecast Forecast NULL 3 NULL

Example of the line number used as index set to FALSE

Element Caption Element Uniquename ID Name ElementType OrderPosition DataSourceID
Variance Variance Variance Variance NULL 2 NULL
Actual Actual Actual Actual NULL 1 NULL
Budget Budget Budget Budget NULL 1 NULL
Simulation Simulation Simulation Simulation NULL 2 NULL
Forecast Forecast Forecast Forecast NULL 3 NULL

Using =RDB(HYPERBLOCK("HyperblockXXX"), "Variance", "OrderPosition") provides output value 2.

Example of the line number used as index set to TRUE

Element Caption Element Uniquename ID Name ElementType OrderPosition DataSourceID
1 1 Variance Variance NULL 2 NULL
2 2 Actual Actual NULL 1 NULL
3 3 Budget Budget NULL 1 NULL
4 4 Simulation Simulation NULL 2 NULL
5 5 Forecast Forecast NULL 3 NULL

Using =RDB(HYPERBLOCK("HyperblockXXX"), "3", "Name") provides output value Budget.