Return only number to the Request Widget

Yathvika
Tera Contributor

My Requests widget on the EC portal is showing Tickets short description, number, requestor.
But we should show only the number of the ticket along with SD/title.

I've seen in the OOB 'MY Requests' widget they are using same div class to show the number and Requestor. Hence the script f is returning number, request SD/title. How to exclude to return the other details except number.

 

HTML:

 <small class="text-muted">
<div ng-repeat="f in item.secondary_displays" class="secondary-display">
<span >{{::f.display_value}}</span>
</div>
</small>

Server script:

 

function getField(gr, name) {
var f = {};
var id = gr.getUniqueValue();
gr = new GlideRecord(gr.getRecordClassName());
gr.get(id);
f.display_value = gr.getDisplayValue(name);
f.value = gr.getValue(name);
var ge = gr.getElement(name);
if (ge) {
var ed = ge.getED();
if (ed)
f.type = ed.getInternalType();
f.label = ge.getLabel();
}
return f;
}

Logs for display_value:

Yathvika_0-1699413581632.png

 

TIA

1 REPLY 1

Nisha Mishra23
Tera Contributor

Hello 

did you get any solution for that. Actually I do have same requirement.