Using form templates
Templates simplify the process of submitting new records by populating fields automatically.
To use a template, populate the most-used fields for a specific table, save it as a template, and then make the template accessible to your users. Users can manually apply a template when creating records, or an administrator can define scripts to apply templates automatically.
Create templates for the forms that you use frequently, such as incident, problem, and change. There is no limit to the number of templates that you can create or access, but having many templates for each form makes the templates more complex to manage.
You can create table-level access controls to restrict template creation. When applied, a user creating a new record from a template must satisfy the save_as_template access control for every field modified by the template.
Automatically applied templates
You can make a template that automatically applies to new, user-created records on a specific table. To create this kind of template, set the template name to match the name of the table to which the template applies.
For example, imagine you want to apply a template automatically when a user creates a record on the Windows Server [cmdb_ci_win_server] table. Set the Name field to cmdb_ci_win_server and the Table field to Windows Server [cmdb_ci_win_server] on the Template form.
Automatic templates are always global. They do not honor the User and Groups fields on the Template form. Automatic templates do not apply to records created by the system, such as those records generated by business rules, UI actions, or workflows.
- Create a template using the Template form
Create a template record for any table to populate certain fields automatically. - Create templates for related task records
Administrators can create a template for a Task table record that also creates one or more related records in the child Task table. - Create a template by saving a form
Save a populated form as a template. - Schedule record creation from a template
You can create and schedule a scheduled job to create records based on a template. For example, you can regularly create a populated task record to perform a weekly backup. - Create a module for a template
You can create a module to open a form with pre-populated template data. - Template bar
Use the template bar to apply, edit, and create templates. - Toggle the template bar
The template bar appears at the bottom of forms. It provides shortcuts to apply, edit, and create templates. - Scripted templates
You can apply an active template to a record using JavaScript.
Parent Topic:Administering forms on the ServiceNow AI Platform
Related topics