Administer > Service Portal Administration Guide > Enable query field autofill for catalog item user options

Enable Query Field Autofill for catalog item user options

A user option of a catalog item in Service Manager may have a "Record in Table" query defined. For more information, see Create a dynamic user option. Query Field Autofill is a feature that automatically displays a single value to end users when a "Record in Table" query returns only one result.

By default, the Query Field Autofill feature works as described in the following table.

User option setting Query Field Autofill
  • Mandatory Condition=true
  • Visible Condition=true
Enabled
  • Mandatory Condition=true
  • Visible Condition=false

Disabled

Note Can be manually enabled as described in this document.

Mandatory Condition=false

N/A

However, there might be cases where the request fulfillment process in your organization requires this feature to be enabled for user options that are invisible to end users but needed for the backend system. In this case, you can manually enable this feature for user options that are mandatory but invisible to end users. To do this, follow these steps:

  1. Log in to Service Manager as a system administrator.
  2. Enter sl in the command line and press Enter.
  3. In the Name field, enter ScAPI_dynamicFormValidation.
  4. Click Search.
  5. Comment out the following line in the script:

    lib.dynamicFormGenerator.setValue(node,""); //clear the value if it is invisible.
  6. Save the script.