Use reference qualifiers to restrict the data that is selectable for a reference field.
Types of Reference Qualifier
These types of reference qualifiers are available:
- Simple qualifiers provide choice lists for you to specify a reference qualifier condition on the table where the reference field is located.
- Advanced qualifiers provide a text field for you to create either of the following:
- A static encoded query string, which is a single string that specifies a database query, such as active=true.
Prior to the Eureka release, only advanced reference qualifiers were available.
Configuring Reference Qualifier
System administrators can configure reference qualifiers through the system dictionary. The Dictionary Entry form provides both a Default view and an Advanced view.
- Navigate to the reference field on the form you want to edit.
- Right-click the form label and select Configure Dictionary.The Dictionary Entry form opens. The simple reference qualifier is available on both the Default view and the Advanced view. The dynamic and advanced reference qualifiers are available only in the Advanced view.
- To change views, select Default view or Advanced view under Related Links.
- In the Reference Specification section, verify that the table already present in the Reference field is the correct one, or select another table if necessary.
- Select the type of qualifier in the Use reference qualifier choice list.
- Configure the qualifier:
Simple: Build the condition using the choice lists.
Dynamic: Select a dynamic filter option.
7. In the Reference Specification – Additional Customization section, configure these options if necessary:
Reference key: allows you to identify a field other than sys_ID to use as the unique identifier for the reference field.
Reference cascade rule: allows you to define what happens to a record if the record it references is deleted.
Reference floats: enables the Edit button on related lists for one-to-many relationships
Dynamic creation: lets you determine if the system should create a new record when a value for the reference field does not match an existing record. If you select this option, enter a script in the Dynamic creation script field that specifies how to create the record.
8. Click Update.
EXAMPLES OF REFERENCE QUALIFIER
Use simple reference qualifiers when you want to limit the values for a reference field based on other values in the referenced table or or related tables.
The base system provides several simple reference qualifiers by default. An example is the reference qualifier on the Vendor field on asset forms, such as the Hardware form. The qualifier restricts the companies you can select for this field to only those companies with the Vendor field set to true.
Use dynamic reference qualifiers when you want to limit the values for a reference field based on a dynamic filter option that uses a scripted filter. The advantage of using a dynamic reference qualifier is that you can create one dynamic filter option and in as many dynamic reference qualifiers as needed.
The base system provides several dynamic filter options by default. An example is the dynamic filter option for the reference qualifier on the Model ID field. This field appears on a configuration item form, such as the default Computer form. The reference qualifier calls the CI Model Qualifier dynamic filter option, which in turn calls the Model & category filter script include. This script include refines the reference qualifier based on the class of the CI so that the only options for the model ID are those that belong to the same class as the current CI.