How to add Category in Response Template UI Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi All,
Please share your inputs /idea on below concern.
I would like to add Response Category field with Dropdown list, please let me know who can we do it.
UI PAge : sn_templated_snip_message_template (OOB),
based on Category selection on ui page Templates list should be sorted .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago - last edited 3 hours ago
Hi @Chavan AP ,
Thank you so much for your efforts on this.
I can see you updated OOB UI Page(Client script), Script-Include(new function)
new custom filed "u_category" on table- sn_templated_snip_note_template
Kindly let me know if my below requests possible. my requests :
1. Can we design the same behaviour without create custom field on "sn_templated_snip_note_template".
2. Can we update UI Page client script like below
var gr = new GlideRecord("sn_templated_snip_note_template");
gr.addEncodedQuery(“conditionISNOTEMPTY^conditionLIKE”+categorySelected);
gr.orderBy("name");
gr.query();
while (gr.next()) {
$j("#template_select").append('<option value="' + gr.getValue('name') + '">' + gr.getValue('name') + '</option>');
}
3. Without create Custom field on NoteTemplate,
Adding Category like below.
<div class="field-column">
<g:form_label for="category">
${gs.getMessage("Category")}
</g:form_label>
</div>
<select id="category" name="category" class="form-control select2">
<option value="">-- Select Category --</option>
<g:evaluate>
var gr = new GlideRecord('sys_choice');
gr.addQuery('name', 'incident');
gr.addQuery('element', 'category');
gr.addQuery('inactive', false);
gr.orderBy('label');
gr.query();
</g:evaluate>
<j:while test="${gr.next()}">
<option value="${gr.getValue('value')}">${gr.getValue('label')}</option>
</j:while>
</select>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
you will have to customize that OOTB UI page.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
Hi @Ankur Bawiskar ,
Yes, I cloned OOB UI page into Global SCope, making changes as per client requirment.
based on Category selection templates has to be sorted and loaded in Template field.