Panorama has special features that make it very easy to display information in a database in a Matrix Object, or even to link the object with a database so that clicking on an item in the matrix automatically jumps to the corresponding record in the database. To illustrate these features this page will use this database of books.

Linking a Matrix to Display the Current Database

To link a Matrix Object to the current database you need to make two changes to the settings in the Data panel.

These two changes have been made in this example.

Once these two options are set up, objects placed inside the Matrix Object Frame can use fields from the database in their formula. For example, this Text Display Object is set up to display the Title field from the database.

This Text Display Object will display the Price field.

When the Pass Thru option is used, you don’t have to set up the Matrix Object formula option – you can simply leave that option blank.

Linking the List to the Database Current Record

Normally, the selected item in a Matrix Object is completely independent of the current record of the database. However, if the Database Navigator option is enabled, and info(“Visible”) in entered in the Query cell, the matrix selection and the database current record will be locked together. (Note: You cannot enable the Database Navigator option without also enabling the Pass Thru option.)

Clicking on an item in the matrix will cause the database to jump to that spot, so that the matrix can be used to navigate within the database (hence the name of the option). This link works in both directions – so clicking on a different record in the data sheet updates the selection in the Matrix Object.

Important: When the Database Navigator option is checked, the Selected Value option is ignored. Even if you’ve specified a field or variable name for the Selected Value, the Matrix won’t do anything with that field or variable if the Database Navigator option is enabled (so you might as well leave the Selected Value option blank).

If you think about it, there’s really no need for a separate field or variable to hold the selected choice – you can always find that out directly from the database fields.

Using a Matrix to Display Another Database

A Matrix Object isn’t limited to displaying only the current database, it can display any open database. Just specify the database name you want to use.

When displaying other databases, you cannot use the Pass Thru or Database Navigator options. This means that you cannot directly reference database fields in objects placed on the Matrix Frame Object. Instead, you need to have to set up a formula in the Matrix Object that references the fields. In this example the formula constructs a tab delimited array containing the field data we want to display (Title and Price).

Panorama uses this formula to construct the value returned by the info(“matrixcelldata”) function. You can use this function in the objects placed on the Matrix Frame Object. For example, this Text Display Object is set up to display the Title field from the database.

This Text Display Object will display the Price field.


See Also


History

VersionStatusNotes
10.0NewNew in this version.