Service Catalog Item Template

malar1274130620
Giga Contributor

Through experimentation, it appears that a template linked to a service catalog item is utilized exclusively when the item type is a record producer.

We are eager to pre-fill certain values using a template, but we prefer not to use a record producer.

Therefore, I have two questions:

  1. Is it accurate that templates are only applied to record producers?
  2. If that is the case, does anyone have suggestions for pre-filling values?
2 REPLIES 2

OlaN
Giga Sage
Giga Sage

Hi,

Not entirely sure I understand the question, templates can be used for creating Catalog items, reference to Docs.

 

If you're looking to set the default values on the variables in the Catalog item, there is a Default value field you can fill in for this purpose.

venkat917181
Tera Expert

Hi Malar,

Your observation is correct. Templates are only applied to Record Producers when creating a record. This is because a Record Producer creates a record in a specific table, and templates are designed to populate field values in that record.

However, since you prefer not to use a Record Producer, here are some alternative ways to pre-fill values in a Service Catalog Item:

Alternative Methods to Pre-Fill Values Without a Record Producer

  1. Using a Catalog Client Script
    You can use a Client Script (onLoad) to set default values dynamically.

     
    function onLoad() { g_form.setValue('short_description', 'Pre-filled Description'); g_form.setValue('priority', '2'); }
    • This works for catalog variables but not for table fields.
  2. Using a Workflow or Flow Designer Action

    • If the Catalog Item is linked to a workflow, you can add a task or script step to update the requested item’s fields before submission.
  3. Using a GlideAjax Call (For fetching values from elsewhere)
    If the values need to be pulled dynamically from another table:

    • Create a Script Include (Server-Side) to fetch the data.
    • Call it from a Client Script using GlideAjax.
  4. Using an Advanced Reference Qualifier (For Reference Fields)

    • You can use a Reference Qualifier to pre-populate reference fields based on conditions.
  5. Using UI Policies (for default selections)

    • A UI Policy can pre-fill values or set defaults when the user selects a specific option.