Map

Clicking the Map task opens the Database Table/Column Map dialog box. From this dialog box, you can map between the results/columns of a query and Genesys Agent Scripting fields.

The left-side of the screen shows a tree with the tables and columns for a query as well as the Genesys Agent Scripting fields to which each column is mapped. If the query is selected, the following options become active on the right-side of the screen.

Query Mapping (select info)Select Queries

This option allows you to map the values returned by the SQL query to a Genesys Agent Scripting table. In order to do so, select the table field to which to map the results from the drop-down list.

This option is useful if the query is returning more than one record from the database.

Query Mapping (update from)Update Queries

This option allows you to map where the values in the database are being updated from. Available choices are Insert, Update, and Delete, as well as any predefined Genesys Agent Scripting table fields.

Result Mapping

Result Mapping is used on update queries for returned values. An update query might return multiple values if you are inserting data from a Genesys Agent Scripting table. Each insertion of data generates a key. You can set the result mapping to a table. This results in the key mapping in the table section to just show columns within that table.

Result Code

This option allows you to map the numeric result code returned by the SQL query to a Genesys Agent Scripting field. In order to do so, select the Field to which to map the result code from the drop-down list.

Result Description

This option allows you to map the result description returned by the SQL query to a Genesys Agent Scripting field. In order to do so, select the field to which to map the result description from the drop-down list.

SQL Command

This option allows you to map the SQL query that was executed to a Genesys Agent Scripting field. In order to do so, select the field to which to map the SQL command from the drop-down list.

Add Table

This option allows you to add a table to the query as described above. Clicking this button opens the Table Properties dialog box.

Edit Field List

Clicking this button opens the Field List dialog box. From this window, fields can be added, edited, or deleted.

If a table is selected in the tree, the following options are available on the right-side of the screen.

Edit Table

This option allows you to edit the selected table. Clicking the buttons opens the Table Properties dialog box.

Key Mapping

This field is only active for update queries. Each insertion of data into the database generates a key. This field lets users map the contents of a Genesys Agent Scripting field as the key. The drop-down list allows you to select which fields should generate the key. If the update query is inserted from a Genesys Agent Scripting table, the key mapping field will only allow you to select from columns within that table.

Add All Columns

This option allows you to add all columns from the selected table to the query as described above. Clicking the Add All Column opens the Column Properties dialog box. If a column has already been added to the table query, it will not add it a second time.

Add A Column

This option allows you to add a column to the selected table in the query as described above. Clicking Add A Column opens the Column Properties dialog box.

Remove Unmapped Columns

This option to remove any unmapped columns from the query. Results will no longer be returned for those columns.

Edit Field List

This option opens the Field List dialog box. From this dialog box, fields can be added, edited, or deleted.

Map Type

This option tells you the type of mapping that occurs. Database columns can be mapped to Columns or Fields. If multiple rows are being returned and the results written to a Genesys Agent Scripting table field, the database columns should be mapped to columns in the Genesys Agent Scripting field. If a single result is returned, database columns should be mapped to fields.

Field Group

This option filters the field list based on the group. Select the field group from the drop-down list and the Field list will only display those fields that belong to the selected group.

Field

This option lists all of the possible Genesys Agent Scripting fields to which the selected column may be mapped. Select a field from the list and the column will be mapped to it.

To unmap a column, select [Not Mapped] from the list.

Edit Column

This option allows you to edit the selected column. Clicking this option opens the Column Properties window.