How to add Category in Response Template UI Page

chanikya
Kilo Sage

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.

chanikya_0-1757545507043.png

UI PAge :  sn_templated_snip_message_template (OOB),
based on Category selection on ui page Templates list should be sorted .


 

10 REPLIES 10

I made changes and did it possible,
Kindly check XML file and let me know if I want to make any changes please.

Hi @Ajay_Chavan ,

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>




 

Let me check, allow me some time to update

 

 

Glad I could help! If this solved your issue, please mark it as Helpful and Accept as Solution so others can benefit too.*****Chavan A.P. | Technical Architect | Certified Professional*****

I shared XML file , kindly check them please.

Please let me know that can we add Ms.Word Letterhead and populate Response Template  on Company Letterhead ?

Ankur Bawiskar
Tera Patron
Tera Patron

@chanikya 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader