The Dynamic Default Value Pattern enables you to automatically populate form fields with contextually relevant data when users create or access records in ServiceNow. Unlike static default values defined in dictionary entries, this pattern calculates defaults based on current user properties, related record data, business logic, or external system information.
This pattern addresses the common need to reduce manual data entry while ensuring data consistency across your ServiceNow instance. For example, automatically setting a user's department, location, or manager when they submit a catalog request, or pre-populating incident fields based on the affected configuration item's attributes.
The pattern works through multiple mechanisms including onLoad client scripts for form fields, variable default values for catalog items, and dictionary-level defaults. Understanding the order of precedence between these mechanisms is crucial - dictionary defaults execute first during record initialization, followed by catalog variable defaults, and finally client-side onLoad scripts that can override previous values.