Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

Scripted List on Service Portal

rconstantino
Mega Sage

Good afternoon,

 

I have on my Service Portal two menu items that are a scripted list.

One for My Open Tickets and one for My Ticket History.

Here is a snippet from one of them (we also show REQs and a custom table)

var z = new GlideRecord('incident');
z.addActiveQuery();
z.addQuery('caller_id', gs.getUserID());
z.orderByDesc('sys_updated_on');
z.setLimit(max);
z.query();
while (z.next()) {
var a = {};
$sp.getRecordValues(a, z, 'short_description,sys_id,number,sys_updated_on');
if (z.short_description.nil())
a.short_description = "(No description)";
a.__table = z.getTableName();
a.type = 'record';
a.sortOrder = z.sys_updated_on.getGlideObject().getNumericValue();
t.items.push(a);
}

 

Filtered list won't work because I can only select one table and we don't want multiple menu items.  We need to include all ticket types under My Open Tickets and My Ticket History.  I have them all included except for Tasks.

 

Using the above example is there a way to only display task records that start with TASK? 

 

As always,

Thank you in advance

Rachel

0 REPLIES 0