Return only number to the Request Widget
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2023 07:20 PM
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:
TIA
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2024 12:49 PM
Hello
did you get any solution for that. Actually I do have same requirement.