##### Define > Fields

# Fields Overview

The Define Fields menu option is the fifth item in the Define menu. This item allows you to define fields. Fields are used for collecting and displaying information. They are also used to control branching. There are many types of fields that can be defined in Genesys Agent Scripting. Selecting the Define Fields menu option opens the Field List dialog box.

The Field List dialog box lists all fields that have been previously defined.

## Filter by Type

This filter allows you to display only the fields of the type that you specified in the drop-down list.

## Filter by Group

This filter allows you to display only the fields that belong to the specified group.

## Sort by Group

When selected, the fields in the list are sorted first by group and then alphabetically. When not selected, the fields are sorted alphabetically regardless of which group they belong to.

## Reference Filter

This filter allows you to display All, Unused, or Used objects in the list.

## Add

Clicking Add opens the Field Properties dialog box.

## Edit

Use the Edit button to edit fields. In order to edit a field, you must select a field from the Field List and click Edit. When this option is selected, the Field List will appear. You can then edit any item on this dialog box.

## Copy

This option allows you to make a copy of a field. Clicking Copy opens a confirmation message.

- Click Yes to add a copy of the selected object to the Field List.

- Click No to close the dialog box without making a copy of the field.

## Delete

Use the Delete button to delete fields. In order to delete a field, you must select a field from the Field List and click Delete. Clicking Delete opens a confirmation message.

- Click No to cancel the delete.

- Click Yes to continue.

When you select Yes, Genesys Agent Scripting will first verify that the field to be deleted is not used anywhere in the system. If the field is not being used anywhere else, it will be deleted. However, if any other object references the field, you will not be able to delete it at this time and a message will appear.

- Click No to return to the Field List.

- Click Yes to open the Object Cross Reference dialog box.

Until all of the references are removed, you cannot delete the field. Double-clicking on each reference will take you to the selected object.

You may select multiple fields to be deleted by holding the Shift key while selecting the fields.

## Predefined Fields for Reporting

Two predefined fields are provided for use with reporting:

G_Reporting_Business_Result

Type = String

User-defined text that will be automatically collected at every Reporting Data Collection Point, and is included as part of the Page Reporting Data.

G_Reporting_Process_Flow_Result

Type = Drop Down List

Predefined states that determine the state of the Process Flow. Collected at every Reporting Data Collection Point, and included as part of the Process Flow Reporting data and the Page Reporting data.

Started: The Process Flow has been started and is in progress.

Suspended: The Process Flow has been suspended.

Resumed: The Process Flow has been resumed (restarted) following a suspend operation.

Abandoned: The Process Flow has been terminated with incomplete results.

Completed: The Process Flow has been successfully ended.

Transferred: The Process Flow has been Transferred to another Agent.