HTML:
<!--<div class="panel panel-{{options.color}} b">--> <div class=""> <!--- <h4 class="panel-title">${Recently Updates Tickets}</h4> --> <!-- <h5 class="panel-title">${View All Incidents}</h5> ${MY TICKETS} ---> <div class="panel panel-primary b"> <div class="panel-heading"> <h4 class="panel-title"> <a class="bareLink" style="color:#eba925 !important;"> ${Filter} </a></h4> </div> <div > <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHa" class=" menu1212" id="home_page" style="cursor:pointer;">A</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHb" class=" menu1212" id="home_page" style="cursor:pointer;">B</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHc" class=" menu1212" id="home_page" style="cursor:pointer;">C</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHd" class=" menu1212" id="home_page" style="cursor:pointer;">D</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHe" class=" menu1212" id="home_page" style="cursor:pointer;">E</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHf" class=" menu1212" id="home_page" style="cursor:pointer;">F</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHg" class=" menu1212" id="home_page" style="cursor:pointer;">G</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHh" class=" menu1212" id="home_page" style="cursor:pointer;">H</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHi" class=" menu1212" id="home_page" style="cursor:pointer;">I</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHj" class=" menu1212" id="home_page" style="cursor:pointer;">J</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHk" class=" menu1212" id="home_page" style="cursor:pointer;">K</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHl" class=" menu1212" id="home_page" style="cursor:pointer;">L</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHm" class=" menu1212" id="home_page" style="cursor:pointer;">M</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHn" class=" menu1212" id="home_page" style="cursor:pointer;">N</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHo" class=" menu1212" id="home_page" style="cursor:pointer;">O</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHp" class=" menu1212" id="home_page" style="cursor:pointer;">P</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHq" class=" menu1212" id="home_page" style="cursor:pointer;">Q</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHr" class=" menu1212" id="home_page" style="cursor:pointer;">R</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHs" class=" menu1212" id="home_page" style="cursor:pointer;">S</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHt" class=" menu1212" id="home_page" style="cursor:pointer;">T</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHu" class=" menu1212" id="home_page" style="cursor:pointer;">U</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHv" class=" menu1212" id="home_page" style="cursor:pointer;">V</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHw" class=" menu1212" id="home_page" style="cursor:pointer;">W</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHx" class=" menu1212" id="home_page" style="cursor:pointer;">X</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHy" class=" menu1212" id="home_page" style="cursor:pointer;">Y</a> <a href="?id=all_tickets_atoz&table=sc_cat_item&filter=type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^nameSTARTSWITHz" class=" menu1212" id="home_page" style="cursor:pointer;">Z</a> </div> </div>
Server script
// Incident open var strQuery = 'priority=1^state=1'; var inci = new GlideRecord('problem'); inci.addEncodedQuery(strQuery); inci.query(); var count = inci.getRowCount(); data.recordCountinc = count; //Incident Closed strQuery = 'priority=1^state=4'; var incid = new GlideRecord('problem'); incid.addEncodedQuery(strQuery); incid.query(); count = incid.getRowCount(); data.recordCountincid = count;
Output
Show all alphabet in Service Portal to filter records alphabetically widget code ServiceNow
Working Code Asked question July 6, 2023