Add Code Search Table
add_code_search_tableAdd a table to a code search group to expand search coverage. Provide table name, fields to search, and the group's sys_id.
Instructions
Add a new table to an existing code search group, expanding what gets searched. After adding a table, code searches using that group will also search the specified fields on the new table.
Requires the search group's sys_id (get it from list_code_search_groups) and the table name and fields to search.
IMPORTANT: This modifies the code search configuration on the instance. Verify the table name and fields before adding.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | The ServiceNow instance auth alias (e.g., "myinstance", "prod"). If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| table | Yes | The table name to add to the search group (e.g., "sys_script_include", "sys_ui_script"). Use `lookup_table` to verify the table name exists. | |
| search_fields | Yes | Comma-separated field names to search on this table (e.g., "script,name", "script"). Use `lookup_columns` to find available fields on the table. | |
| search_group | Yes | The sys_id of the target code search group. Get this from `list_code_search_groups`. |