Altering tables and fields using dictionary attributes
- UpdatedAug 1, 2024
- 19 minutes to read
- Xanadu
- Table Administration
Dictionary attributes alter the behavior of the table or field that the dictionary record describes. Administrators can add or modify dictionary attributes.
Adding an attribute
To add or remove an attribute to a table or field, open a dictionary record, select the Advanced link, and modify the Attributes field. Alternatively, in a dictionary record, select New in the Attributes related list. For details on modifying dictionary entries, see Modify dictionary entries.
Attributes are comma-separated. If attributes exist on a dictionary record, add a comma with no spaces before adding an attribute.
- To specify a value of true, you can either enter attribute or attribute=true.
- To specify a value of false, you can either ensure that the attribute does not appear or enter attribute=false. To maintain the values during upgrades, do not remove an attribute that is on a table by default.
Maintaining attribute values for upgrades
If you remove an attribute that is part of the base system, it is automatically restored during an upgrade. To prevent upgrades from changing the behavior of your system, leave the attribute on the table or field, but set its value as desired.
For example, if a field has the attribute knowledge_search=true by default, do not remove the attribute to set it to false; rather set it to knowledge_search=false.
Available dictionary attributes
Name | Value | Target Element | Description |
---|---|---|---|
allow_null | true/false | field_name field | If present or true, enables you to enter None as the field |
allow_public | true/false | table_name field | If true, the table name field displays tables from all scopes instead of only the current scope. |
allow_references | true/false | field_name field | If true, a tree is displayed to select from that includes reference fields so you can dot-walk. |
allowHugeAlter | true/false | any table | If true, enables you to add a column to a table with more than 100 million rows. |
approval_user | name of field containing the users for the approval type this field represents | integer field | Specifies the table fields that are used to perform lookups using a matcher. You specify approvals as table fields that have an attribute of approval_user=<field_name>, where
<field_name> indicates the field in the table that contains the users for this approval type.
|
attachment_index | true/false | any table | If true, attachments on the table are indexed for search purposes. To learn more, see Index attachments on a table. |
barcode | true/false | string field | Enables a string field to access a camera on a mobile device to scan and process a bar code. |
base_table | name of base table type | table_name field | Specifies the table_name field that enables you to select any table that is derived from the table specified by this attribute. By default, the base table itself is also included in the list (but see skip_root to turn off this behavior). |
calendar_elements | list of field names, separated by semicolons (";") | any calendar event table | Specifies the list of fields used when constructing the description of a calendar event. If not specified, the display name plus short description are used. The calendar_elements attribute does not support derived (dot-walked) fields. |
collection_interval | interval specified as "HH:MM:SS" (like "01:02:30" for one hour, two minutes, and 30 seconds) | collection field | Specifies the interval of metrics collection. |
close_states | inactive state integer values | task state field | Used by the TaskStateUtil API to identify the list of inactive state values delimited by semicolons (;) |
critical | true/false | any field in the apm_application table | Defines fields that have critical information about an application, which enables tracking the entry of critical information. |
current_location | true/false | string field | Enables a string field to access the GPS location of a mobile device. |
disable_execute_now | true/false | any table derived from sys_auto | If present or true, disables the usual Execute Now button. The Now Platform applications that use schedules, such as Discovery, use this attribute to substitute their own more appropriate action. |
default_rows | integer value | multitext fields | Sets the default number of rows in a multitext field. |
default_close_state | state integer value | task state field | Used by the TaskStateUtil API to identify the default close state value for a task table. |
default_work_state | state integer value | task state field | Used by the TaskStateUtil API to identify the default working state value for a task table. |
detail_row | name of field to display in detail row | any table | Displays the value of the specified field as a Lists for each record in the list view. UI15 is required to use this attribute. Note: If different detail_row attributes are defined for a parent
table and a child table, the system uses the child table attribute. |
display_image | true/false | table with fields of the user_image type | If present or true, displays records of the user_image type in an image form. If the record is in the [sys_user] table, and the image is not available, the user initials are displayed. |
document_viewer_audit | view, download, or all | any table | When the Document Viewer is enabled, this attribute keeps a record of the user actions that are performed on attachments. The values are as follows:
|
email_client | true/false | any table | If present or true, causes an icon (an envelope) to appear in the more options menu in the form header. If you click it, a pop-up email client appears. |
exclude_auto_recovery | true/false | any table | Disables automatic recovery of draft records for this table and its extensions. |
exclude_from_rollback | true/false | any table | Excludes this table (and any of its descendant tables) from being recorded for rollback. For example, use this attribute to preserve records that are created from an automated test. For tables excluded by default, see Tables excluded from rollback after running an automated test. |
extensions_only | true/false | any table | Specifies that the table should only have records in tables that extend it. For example, the Task table has this attribute because you would create incident, problem, change records, and not task records. |
field_list_selector | true/false | any glide_list | Enables the user to select a field from the dependent table (or current if the dependent is not specified). Some workflow activities use this attribute. |
field_decorations | UI Macro name list, separated by semicolons (";") | most fields (except list and multiline text fields) | Similar to ref_contributions, causes the named UI macro to be invoked when the field is rendered on a form. |
format | format name | any numeric field | Specifies a named format to use instead of the standard numeric formatting. Options are as follows:
Note: This attribute applies only to display values and not user input values. |
glide.db.oracle.ps.query | true/false | any table | If present and false, prevents the use of Oracle prepared queries on the table. |
global_visibility | true/false | any table with a sys_domain column | If present or true, makes this table visible globally even if there are domain restrictions (that is, the sys_domain field has a value). |
hasLabels | true/false | any table | If present or true, marks this table as being the target of a label at some point. You can manually set this attribute, but it is normally set automatically whenever a label is generated. When true, the label engine runs on any change to the table, and updates the labels as needed. |
hasListeners | true/false | any table | If present or true, marks this table as available for listeners to get events (insert, update, delete). |
hasWorkflow | true/false | any table | Instructs the workflow engine to listen for changes to the table and fires events to a workflow when a record associated with a particular workflow has changed. |
html_sanitize | true/false | any HTML or translated HTML field | If present or true, enables HTML sanitization for the selected HTML or Translated HTML field. By default, performs HTML Sanitization on all HTML and Translated HTML fields. Set this attribute to false to disable sanitization. |
html_sanitize_config | name of custom sanitizer configuration file | any HTML or translated HTML field | If present, performs sanitization using the specified configuration file instead of the default platform sanitizer. For example, the Embedded Help [sys_embedded_help_content] table uses a specified file (EmbeddedHelpSanitizerConfig) for the help Content field. |
icons | name of JavaScript class | any workflow field | Specifies a JavaScript class that produces workflow icons. |
ignore_filter_on_new | true/false | any field | If true, prevents the fields on a form from populating with values from a filtered list. |
image | relative path of image file | any table | Specifies an image file to use when a module or BSM map uses this table. This specification overrides the icons that would otherwise be used for the table. |
include_container_types | true/false | any internal_type field | Causes the field to render with container (split) types as well other types. |
ip_data_control |
|
field type on any table | Checks whether the data should be normalized through the ip_data_control attribute.
|
isOrder | true/false | any field | Sets the field as the default field that is used for the sort order in lists. Overridden by the ORDERBY URL parameter, or the user's sort preferences. |
iterativeDelete | true/false | any table | If present or true, forces all row deletes to execute iteratively. Otherwise, you can perform some deletes using a more efficient bulk method. |
json_view | true/false | any table | if a JSON object is associated with the field, places an icon next to a field that, when you click it, displays the data interchange information. |
knowledge_custom | name of JavaScript function | any field | Specifies a JavaScript function to implement a custom knowledge search (see knowledge_search). |
knowledge_search | true/false | string fields | If present or true, causes a knowledge search icon (a small book) to appear next to the field. Clicking this icon launches a pop-up window for searching the knowledge base, unless a custom knowledge search function has been specified. To learn more, see knowledge_custom. |
largeTable | true/false | any table | If present or true, marks this table as "large" to preventing table locking with specific MySQL database operations (adding/removing a column/index, compacting a table). Without this attribute (or the smallTable attribute), the glide.db.large.threshold property, or the default value of 5,000, determines whether a table is large. |
listen | true/false | any field | If present or true, calls a JavaScript function named <tableName>_<fieldName>Listen, or globalListen if that function does not exist. It calls the function with arguments (tableName, fieldName, oldValue, newValue). |
live_feed | true/false | any field | If present or true, creates a toggle option on the activity formatter header for incidents, tasks, and problems. The toggle provides a choice between the Live Feed for that record (also known as a document feed) or the activity formatter fields already in use. To learn more, see Activity formatter for more details. |
long_label | true/false | any reference field | Long or short labels refer to the label that appears for reference fields on a form. For example, if the reference field contains the caller’s email address, the long label would be Caller Email, while the
short label would be Email.
|
maintain_order | true/false | any glide_list | If present or true, the up/down arrow order buttons appear to the right of the list of selected items. Note: You need to use the Add multiple button to see the order
buttons. |
mode_toggler | true/false | any composite_name field | If present or true, causes a name mode toggle icon (a small right-pointing triangle) to appear to the right of the label. Clicking this icon causes the field's rendering to change from a text field that accepts <tablename>.<fieldname> to a pair of reference choice boxes (one for the table, the other for the field). The latter is the default. |
model_class | binary Java class name | any field of type glide_var | Specifies a model variable within the Java code. The model must have a class that implements the IVariablesModel interface. |
model_field | see description | any field of type glide_var | Identifies a reference field in the record that has the model defined for it. For example, a workflow activity is associated with an activity definition. The activity definition has a related list of questions that make up the model for that activity definition. By using the activity_definition as the model_field for the activity, it builds the workflow activity model by reading the questions that are defined for the referenced activity definition. |
nibble_size | positive integer | any table affected by the table cleaner. | Specifies the maximum number of records that the table cleaner can delete in a single operation. The default value for this attribute is 250. |
nibble_sleep | true/false | any table affected by the table cleaner. | If false, causes the table cleaner to perform cleanup operations without a pause between each operation. |
no_add_me | true/false | any table | If present or true, hides the display of the Add Me icon that appears next to certain fields, such as the Watch List field. |
no_attachment | true/false | any table | If present or true, prevents the attachment icon (a paperclip) from appearing on the form header. |
no_attachments | true/false | any table | If present or true, attachments are not checked for and deleted when a record from this table is deleted. Meant for high-activity tables that never have attachments. |
no_audit | true/false | any table | If present, this field is not audited, even if the table is being audited. The true or false value is ignored. |
no_audit_delete | true/false | any table | If present or true, a sys_audit_delete record is never created when you delete a record from this table. Meant for high-activity tables that never need sys_audit_delete information. |
no_auto_map | true/false | any table | If true, this field is not mapped during an import set. Primarily used for LDAP imports. |
no_email | true/false | any glide_list field referencing sys_user | If present or true, the email box is removed from the glide_list field like the Watch list field. |
no_multiple | true/false | any glide_list field | Hides the select multiple icons. |
no_optimize | true/false | any table affected by the table cleaner. | If present or true, prevents the MySQL table compaction operation from running on the specified table. The table compaction operation typically runs after the table cleaner deletes at least 50 percent of the data in the specified table. |
no_separation | true/false | any table | If present or true, marks this table as not participating in domain separation. To learn more, see Domain separation for service providers. |
no_text_index | true/false | any field on a text indexed table, or any child table of a text indexed table | If a table is text indexed, the no_text_index field attribute prevents this field or child table from being included in the text index. |
no_truncate | true/false | any string field | In a list view, shows the entire text value of the multitext value in a list, without truncating it. Without this attribute, the string is truncated based on the UI property Number of characters displayed in list cells which is 40 by default. |
no_update | true/false | table | True for tables in which records are inserted or deleted but not updated. Prevents the system from creating sys_mod_count, sys_updated_by, sys_updated_on fields in the table when created. Does not stop updates of the table. This attribute setting is used to save space on high volume system tables, such as syslog and sys_audit. |
no_view | true/false | any glide_list field | Hides the view-selected item icon. |
onlineAlter | true/false | any table | Tables with the onlineAlter attribute perform MySQL database operations using online schema changes.
|
order | numeric value | model variable fields | Used internally only (for model variables). |
pop-up_processor | binary Java class name | any field or table | Specifies a custom pop-up processor for processing the field (or all fields in a table). |
readable | true/false | any conditions field | When true, causes rendering of the conditions field in any list view as a human-readable condition (instead of the encoded query that is stored in the database). |
ref_ac_columns | list of field names separated by semi-colons | any reference field with an auto completer (see ref_auto_completer) | Specifies the columns whose display values should appear in an auto completion list, in addition to the name. To learn more, see the cmdb_ci field (Configuration Item) on the Incident form for a working example. |
ref_ac_columns_search | true/false | any reference field with an auto completer (see ref_auto_completer) | Causes auto-complete to work with all fields that are specified in the ref_ac_columns attribute. This attribute overrides the default behavior, which searches only the display value column. To learn more, see Configure auto-complete to match text from any reference field. |
ref_ac_display_value | true/false | any reference field with an auto completer (see ref_auto_completer) | Causes the reference field to hide the display value column so that the auto-complete function only matches the text from the columns that are listed in the ref_ac_columns attribute.
This feature requires the use of the AJAXTableCompleter class and the ref_ac_columns, ref_ac_columns_search, and
ref_ac_display_value attributes. To learn more, see Remove the display value column. Note: The ref_ac_display_value function does not work with Catalog Item variables. |
ref_ac_order_by | field name | any reference field with an auto completer (see ref_auto_completer) | Specifies the column that is used to order the auto completion list. |
ref_auto_completer | JavaScript class name | any reference field (can be applied to a table to affect all reference fields on the table.) | Specifies the name of a JavaScript class (client side) that creates the list auto completion choices. Valid class values include:
For more information, see Auto-complete for reference fields. |
ref_contributions | UI Macro name list, separated by semicolons (";") | any reference field | When the field renders on a form, it invokes the named UI macro. |
ref_decoration_disabled | true/false | any reference field | When set to true, disables the display of the reference icon on a selected field. |
ref_list_label | label text | any table | Specifies the title to use in a list banner. |
ref_qual_elements | field name list, separated by semicolons (";") | any reference field with a reference_qual field | Specifies a list of fields to send back to the server to get an updated reference. |
ref_sequence | list of fields in referenced table, separated by top hats ("^") | any reference field | Specifies the fields in the referenced table that are used to order the list. This attribute works like an ORDER BY clause in SQL, with each element in ascending order. |
reference_types | list of valid reference types that are clickable separated by semicolons (";") | field_name field | Limits the reference fields that appear in the tree to the specified types. |
remoteDependent | name of database and table (like "model.matcher") | any script field | Defines the remote (such as in another database) table that the script depends on. |
repeat_type_field | field name | a repeat count field for schedule rotation | Specifies the field that contains the repeat type (daily, weekly, monthly, or yearly). |
ro_collapsible | true/false | any multiline field | If present or true, causes an icon (either a "+" or a "-") to appear next to the field label, allowing the field itself to be expanded or collapsed. |
saver_exempt |
|
Fields of metadata records |
When present, determines if the field is written to the xml representation of the record. An absence of the attribute is equivalent to exempt_never. When exempt_always, the field is skipped from writing to xml when exporting (publish, commit to source control, update set). When exempt_vcs_only, the field is skipped from writing to xml only in the source control context. |
scale | integer | decimal field | Sets the number of decimal places to use on a Decimal field type. The default is 2. This attribute is applied to the max length attribute setting for the field. The decimal places for a field are a combination
of the max length attribute setting and the scale attribute. For example, if you want four decimal places for the field, you need a max length attribute setting of 4, plus the default of 15 or 19. You would set the scale attribute to 4 to indicate the number of decimal places. Six decimal places require a max length setting of 21, a scale attribute setting of 6, and so on. Note: Increase the max length attribute to a value greater than 15 to increase this attribute. |
script | a function that returns the contents of the field | any slushbucket field | Enables you to write a script to define what is loaded into the slush bucket field. |
short_label | true/false | any reference field | Long or short labels refer to the label that appears for reference fields on a form. For example, if the reference field contains the caller’s email address, the long label would be Caller Email, while the
short label would be Email.
|
show_all_tables | true/false | document ID fields | Enables users to select documents from system tables. For example, sys_script or sys_user. By default, users cannot select records from system tables. |
show_condition_count | true/false | condition fields | Enables or disables the condition count widget to preview how many records are a set of conditions. To learn more, see Add the condition count to a condition field. |
skip_root | true/false | table_name field | If present or true, removes the base table from the list. To learn more, see base_table. |
sla_basis | list of table names separated by semicolons (";") | any field of date type (glide_date_time, glide_date, due_date, date, or datetime) | Defines the tables for which this field determines the start (open) time of an SLA. |
sla_closure | list of table names separated by semicolons (";") | any field of date type (glide_date_time, glide_date, due_date, date, or datetime) | Defines the tables for which this field determines the ending (close) time of an SLA. |
slushbucket_ref_no_expand | true/false | any reference field | If present or true, prevents users from expanding the field from a form or list slush bucket. |
smallTable | true/false | any table | If present or true, marks this table as Small (that is, not large) for querying purposes. Without this attribute (or the largeTable attribute), the glide.db.large.threshold property, or a default value of 5,000 determines whether the table is large. |
start_locked | true/false | any glide_list field | Determines whether the field is locked or unlocked by default. Set the value to false to unlock the field by default. |
staticDependent | name of table | any script field | Specifies the table that the script depends on. |
strip_html_in_pdf | true/false | any field | Attempts to remove HTML tags from a field when that field is exported to a PDF. This attribute is most useful on HTML fields. |
synch_attachments | true/false | any table | Similar to update_synch but writes the file attachments of the record to update sets. To learn more, see Index attachments on a table. |
table | name of table | field_name field | Displays the specified table fields. |
tableChoicesScript | name of script include | table_name field | Specifies the name of a script include whose process() method returns an array of table names from which to select. |
target_field | percent_complete_target decimal field name |
any percent complete field any decimal field |
Works in combination with the target_threshold_colors attribute to define thresholds for percent complete fields. See the description for target_threshold colors. Example:
Specify an additional target_field attribute to compare the actual completion percentage of a task with a target percentage in a different decimal field that specifies where the task should be at this point. Use the column name of the decimal field. Example:
If you do not specify an additional target_field, a target value of 100 is used, allowing you to use the color thresholds with a single field value. See Target threshold colors attribute. |
target_form | name of form | any table | Specifies the alternative form to be used when this table is referenced through a pop-up window on a reference field. |
target_threshold_colors | threshold limit:color | any percent complete field with the target_field attribute | Works in combination with the target_field attribute to define thresholds for percent complete fields. See the description for target_field. |
text_index_filter_junk | true/false | any table | Sets the value to false to Enable or disable the Zing junk filter for the table.
|
text_search_only | true/false | table_name field | Limits the tables listed to those tables that are searchable by text. |
text_index_translations | true/false | any table | If present or true, forces indexes to be recalculated when translated strings are added. You must have a sys-admin role to modify this attribute. This one is automatically set for indexed fields that are translated, and to fields that have a translation and are being indexed. The glide.i18n.force_index system property, which defaults to true, overrides this attribute. |
time_zone_field | name of field containing the time zone | any schedule date/time field | Specifies the field in the parent record that contains the reference time zone for this field. |
timeDimension | true/false | any field of date type (glide_date_time, glide_date, due_date, date, or datetime) in a table subclassed from the task table | If present or true, enables the production of time dimension data for use by OLAP (to produce reports based on quarters, weeks, or other time periods). Note: OLAP functionality has been deprecated. |
tree_picker | true/false | reference field to a hierarchical table | Displays the hierarchy of reference values in a tree display (such as locations). Note: The tree display hierarchy does not appear in reference fields when you are using mobile applications. |
ts_weight | integer value | any field | Controls the relative importance of a match in the field for a text search. To learn more, see Set the relative weight of a field. |
types | list of valid element types separated by semicolons (";") | field_name field | Limits the display of fields to the specified types. |
update_exempt | true/false | any field from a table that has update_synch set to true | If present or true, you can change this field without skipping updates to the rest of the record. During software upgrades, the value of this field is preserved, while the rest of the record receives upgrades. By default, the Active field on a tracked table is treated as update_exempt even if the attribute is not present. |
update_synch | true/false | any table | Indicates that changes in the table are tracked in update sets. Administrators cannot modify this attribute. To migrate data, use an Importing from another ServiceNow instance. |
use_document_viewer | true/false | any table | If present or true, enables users to open supported attachments in a document viewer within the platform, rather than downloading the files directly to their own file system. |
use_workflow | true/false | any table that has delivery plans or uses workflow | If present or true, causes a workflow to be used instead of delivery plans. |
user_preference | true/false | any field | If present or true, causes any user preferences to be used instead of the normal default value. |