External databases

The external database setting is used to handle a connection to a databases outside the Cargo system. To add a new, duplicate an existing or delete the selected database item, use the buttons below the list.

The external database setup is available only for certain Cargo licenses.

The default supported database types are Oracle and MySQL, FileMaker and SQL Server. Other databases may be added upon request.

The name of the database item will be the visible name in the Cargo Dispatch.

If the Cargo system has been installed with the local communication features, which enables communication between the Cargo Dispatch interface and the local editor such as Adobe InDesign (used to for example open ad booking orders directly from the Cargo interface), the option enable local communication must be selected and the local communication folder must be set. Note that this folder is the user's local folder and must be the same for all the Dispatch users.

The external database setup.


The external database setup

Search panel

The search panel is the layout of the search filter in the Cargo Dispatch interface. Clicking the edit button will open the layout editor where the layout may be changed. For more information about the layout editor, see the section Layout editor below.

Server connection

The server connection setup is used to determine the connection to the external database server.

Type The default types in Cargo system are MySQL and Oracle. More database sources may be added upon request.
Server address This is the physical address or IP number where the server is located.
Port The port to use when communicating with the server.
Database name The SID for the database.
Login The user name to use when connecting to the database.
Password The password for the user account.

Server data

The server data setup.


The server data setup

The server data is used to setup the information that should be fetched from the database. When adding new data to fetch from the database a new dialog will appear. The ID is an internal ID which may be used in the server transfer setup and as parameter for the macro RSET that may be used in the result column setup.

The source is the actual place where to get the data from the external database source. If a server connection has been setup correctly all available tables in the database will show up in the table list. Selecting a table will present all available columns in the column list. When a selection in the column list is done the source is setup corrrectly. The source may also be setup manually by typing the table/view and column with a dot in between, e.g. table.mycolumn.

Note that the server data is not availalbe until used in further settings such as transfer setup and result column setup.

Oracle column names

Please note that Oracle column names are often specified with capital letters, using non-capital letters will often result in failure.

The dialog to add server data in the external database source.


The add server data dialog

Advanced SQL setup

While populating the server data list the SQL query sent to the server will automatically update and be seen in the advanced SQL setup view. If a more advanced SQL query is requested the query may be edited manually. Note that macros may be used in this query to enable specific searches based upon search filtering etcetera.

Example

The following text is an example of advanced SQL setup.

SELECT ad.orderNo, ad.orderStatus, ad.publDate, ad.width, ad.height, ad.customerName, ad.customerCompany
FROM ad
WHERE
ad.orderNo>0
%CASE[%LENGTH[%META[from]%]%>0, and ad.publDate>=str_to_date('%META[from]%'%, '%%y-%%m-%%d') ,]%
%CASE[%LENGTH[%META[to]%]%>0, and ad.publDate<=STR_TO_DATE('%META[to]%'%, '%%y-%%m-%%d') ,]%
%CASE[%LENGTH[%META[customername]%]%>0, and (UPPER(ad.customerName) like '%%%UPPER[%META[customername]%]%%%') ,]%
%CASE[%META[status]%==-1, , and ad.orderStatus='%META[status]%']%
%CASE[%LENGTH[%META[order]%]%>0, and ad.orderNo=%META[order]% ,]%

Result columns

The result columns determines what the user should see in the standard view result table.

For each column that is added the column header value may be set, this is the visible column header for the personnel user. The value for the column may contain the special macro RSET with a key from the server data setup. Additional mapping of data may be set to map certain values to other data, e.g. status numerical values to text and or icons.

Note

At least one column must be added or the result table will not show any result in the Cargo dispatch interface.

Details setup

This setup is to enable details when the user selects one of the result row in the Cargo Dispatch client. This detail informatino can be displayed as a table or as a free layout. The details view offer the possibility to make another search in the external database (based on for example some information taken from the selected row) to present more data.

Transfer data

The external database source has a 'transfer' button in it's client interface. When this button is clicked data from the selected row in the database search result will be transferred to the currently selected job or file in the staff interface. The data that should be transferred is selectable in the transfer data setup. When adding a new item to transfer the transfer data dialog appears. At the top of the transfer data setup there is a selection whether the data should be added to the file or job properties.

The dialog to add transfer data in the external database source.


he dialog to add transfer data

The property ID is the selected item's property key. If the key exists in the job the value from the transfer will replace the old value.

The transdfer destination may be file, job or both which means that the data will be transferred to file metadata or job metadata.

The type may be text or multiple row text which indicats a multiple row text.

The value may be set as a static value or be taken from the selected result from the external database. The macro RSET should be used to get data. The parameter in the RSET macro should be the server data ID that was set in the server data setup above.

Transfer notification

Before transfer any data from the external database to the selected job in the Cargo dispatch interface the client may do some additional checks and possibly stop the transfer. These checks are made in the transfer notification setup.

When adding a new transfer notification the transfer notification dialog will appear.

The dialog to add transfer notification in the external database source.


The dialog to add transfer notification

The condition being checked is two condition values with a comparisor between. If this condition is true the message that is set will be shown to the user. If the type of the notification is set to error, the transfer will be stopped. The different types will present the message in a dialog with different icons (information, warning and error).

Local communication

If the local communication is enabled the folder must be set which is the folder locally seen from the Cargo Dispatch application. The text area will contain the default XML setup which should not be altered in normal circumstances.

Layout editor

When a layout is being edited the layout editor is opened in a new window. The layout editor has three main areas. The top toolbox bar contains all the available building tools that may be added to the layout. On the left the building area is located and on the right the component list (if choosen to be visible) and the properties of the building components are seen.

For more general information about the layout editor, see chapter Layout editor.

The layout editor, which is opened in a new window, enables the user to edit the layout of the search item.


The external database search layout editor

See section Layout components for more information regarding each component in the toolbox for the search item.

Layout components

See table below where all the available components in the search layout editor is described. The components' individual property settings are also described.

Note that the search button component is not available in the toolbox. There will be one search button added by default to the layout and this button is not removable.

Layout editor

More general information about the layout editor and properties that are common to all components, see chapter Layout editor.

Source layout components
Layout components and their individual properties

Clear button

The special clear button component.


The clear button component

The clear button component is only available in the external database search layout. The button will reset the rest of the search filter layout components to their initial state. The text property is the label that will be visible on the button.