Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top
top
It is possible to connect XperienCentral to one or more external databases which lie outside the internal database that maintains XperienCentral’s internal content & administrationandadministration. It is possible, however, to place the tables with external data in the same database as XperienCentral’s internal tables. Because XperienCentral can be connected to other databases, it is, for example, possible to request data from the backoffice and show these on the website.

...

  • The overview level shows a list of records from the database.
  • The detail view level shows more details of a selected record.

In the screenshot above, the The upper part shows an overview and the lower part shows a detail view. You can also place the detail view on a different (special) page.

...

Queries are defined using SQL (Structured Query Language). The information returned from the database can then be shown on the website. The following is an example of an SQL query:

...

In this topic, the example database "Who is Who" is used to illustrate concepts. In this database, the whPerson table is the central table containing most of the personal data. The other tables are extensions used to store additional information about the person.




Back to Top


...

Connecting an External Database

...

  1. Make sure a filled external database is available and that you know the connection-related attributes.
  2. Navigate to Configuration -> Database Maintenance.
  3. Select the Database connections tab.
  4. Select New database connection from the drop-down menu (top left). A blank dialogue pane with connection related attributes is shown.
  5. Enter the connection related attributes.
  6. Click Apply. If XperienCentral can make the connection, the product and driver information is shown as well as a table content list.

See Database Maintenance for complete information on connecting external databases.


Back to Top


...

Using Queries

In this section, we set up a basic view on the whPerson table by showing the following fields: lastname, prefix, firstname and email. We start with the following query:

...

  1. Navigate to the desired page.
  2. Add the Query content element to the page.
  3. Select the desired overview query from the drop-down list.





Back to Top


...

Overview with Parameter

Introduction

...

If you selected "Use search pop-up", a panel pops up when setting the locations on the query element.

Showing the Overview with Parameters

The result only shows records in which the location is Amsterdam or Nijmegen.


Back to Top


...

Overview with Link to Detail View

...

The detail view will hereafter be shown on this special page.


Back to Top


...

More Complex Example

  • A parameter that filters on the locations Amsterdam and Nijmegen.
  • A link to a detailed view which is shown underneath the overview.
  • Three columns (Department, Job and Location) whose fields are not retrieved directly from the whPerson table but indirectly through six other tables. This requires a more complex WHERE clause.

...


SELECT firstname + ' ' + prefix + ' ' + lastname AS fullname, title, firstname, prefix, lastname, whDepartment.name AS depname, whJob.name AS jobname, whLocation.name AS locname, email, telephone, devicenumber, fax, mobile, convert(char(10), birthdate, 105) AS birthdate FROM whPerson, whPersonDepartment, whDepartment, whPersonJob, whJob, whPersonLocation, whLocation WHERE  whPerson.id = @dbid@ AND whPerson.id=whPersonDepartment.person AND whPersonDepartment.department=whDepartment.id AND whPerson.id=whPersonJob.person AND whPersonJob.job=whJob.id AND whPerson.id=whPersonLocation.person AND whPersonLocation.location=whLocation.id


Back to Top


...

Reference Information

Database Connection Panel

...

Field

Description

Select

List of database page models (detail views).

[Delete] button

Delete this database connection.

Description

Name of the database page that should be displayed in the selection lists.

Database

List of database connections.

Presentation

Select ‘WM Details’. This is the default value in XperienCentral. Other values (such as ‘WM Agenda’, ‘WM Person’, and ‘WM Product’) are added to the list if certain functionalities are imported in XperienCentral.

Value

A unique value used by the search engine for indexing.

Get information query

This is the query to be run if the detail view has to be displayed. This query is connected with @dbid@ to the record that was clicked through.

The variable @dbid@ contains the primary key in the table and can be used to retrieve the correct record.

For example:

SELECT employee_name, salary, commission FROM employees WHERE  employee_id = @dbid@

Show settings -

A number that determines the sequence of the columns to be shown.

Show settings – Query field

Name of the column in the SELECT clause. This can be a column name or alias (behind the keyword ‘AS’).

Show settings – Column name

Text that should be shown above the column on the page (only if the ‘Show column heading’ is set to ‘Yes’). If this field is left blank, the content of the ‘Query field’ will be used.

Show settings – Don’t show

Indicates whether this column should be shown or not.

Show settings – Always index

A column that is not shown is not indexed by default. To index this column, a check mark can be placed here. This setting is, however, ignored if ‘Index for search’ is set to ‘No’.

Show settings - Delete

The column to be shown can be deleted here.

Show settings - [New column] button + number

Add a number of columns.

Get query

Query to retrieve the title of the database object. This title is shown on the page in a larger font. The query has to contain an ID and a name in the SELECT clause.

Search query

The search query is used in two places:

  1. While indexing the database pages.
  2. While connecting terms to entries that are on a database page.

The query has to return an ID and a name and can use the search parameter to find the proper records in the database. For example:

SELECT whPerson.id AS id, whperson.lastname AS name FROM whPerson WHERE lastname LIKE '%@search@%'

Link query

Using this query, the links related to this table can be retrieved from a specially created link table.

The Link query is only used for the product catalog and for meetings that have been created in the Meetings and Papers component.

Index for search

Indicates whether this type of page should be indexed and, therefore, be shown in the search element.



Back to Top