- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2015 07:06 AM
I have created a Record Producer in the service catalog that contains a Lookup Select Box that shows a list of templates by their short description. What I would like to happen is when the user selects a template from the Lookup Select Box a new change is created and the specific template they selected is applied to the newly created change. Right now I have a template statically assigned in the tab labeled "Generated Record Data" in the record producer screen. So no matter what template they select from the Lookup Select Box, the template that I have statically assigned is applied to the change that is created.
Is there a way to apply the template that the user selects from the Lookup Select Box to apply to the new change, using a record producer?
Ex: Lookup Select Box options:
Template A
Template B
Template C
If the user selects Template C, then Template C would be applied to the new change created by the Record Producer. I know this could be accomplished using multiple Record Producer's, one for each template. However, I am wondering if I could accomplish this using a single Record Producer.
Any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2015 09:07 AM
In your lookup select box, make sure the Lookup value field in the Type Specifications section is the set to the name of the template as that is what the applyTemplate function is expecting. then in your script you would have:
current.applyTemplate(producer.LookupSelectBoxVariableName);
The producer.LookupSelectBoxVariableName value would be set to the Template name chosen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2018 11:39 AM
FYI you are replying to a 3 year old post. 🙂
Instead of your GlideRecord lookup of the template name, I would instead suggest this method which uses a template record's SysID:
GlideTemplate.get(producer.<INSERT_TEMPLATE_SYS_ID_VARIABLENAME_HERE>).apply(current);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2019 10:34 AM
I tried this and seems to be working, but it is not creating change_tasks. Can you advise?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2019 02:31 AM
I don't experience this problem you mention with the change tasks.
Did you add the change tasks to the Standard change template correctly? See Create a standard change task template

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2020 10:33 AM
Milosnew - Did you get the change_tasks to create once the change request was created? I'm experiencing the same issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2023 09:52 AM
Did you get any chance to populate the change tasks in the created change through record producer?