- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 03:08 AM
Hi All,
As per users request, we are adding a OOB table under "My Request" page in Service Portal. So, I have created a record under "My Request Filter" with secondary fields but I was not able to find the field showing up on Portal. Where Number display value is true and it is extended from Task table.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 05:02 AM - edited 11-25-2024 05:13 AM
Hello @Lavanya Damotha ,
For that you need to Clone OOB "My Requests" Widget
After clone that widget follow these steps:
1. Update the HTML Template
In the cloned widget's HTML Template, update the code between lines 116 to 155 with the following:
<div role="table" ng-if="c.data.request.req_list.length > 0" class="table" aria-label="{{::data.messages.myRequestsTitle}}">
<div ng-show="::!data.is_associated_ticket_tab" role="rowgroup" class="column-headers">
<div role="row" class="list-group-item table-responsive">
<span role="columnheader" class="col-xs-3 padder-r-none padder-l-none">${Request}</span>
<span role="columnheader" class="col-xs-3 padder-r-none padder-l-none">${State}</span>
<span role="columnheader" class="col-xs-3 padder-r-none padder-l-none">${updated_capital}</span>
<span role="columnheader" class="col-xs-3 padder-r-none padder-l-none">${Priority}</span>
</div>
</div>
<ul role="rowgroup" class="padder-l-none padder-r-none">
<li role="row" class="list-group-item table-responsive" ng-repeat="item in c.data.request.req_list | limitTo: c.data.lastLimit track by item.sys_id" style="margin:0px" >
<div role="cell" class="col-xs-3 padder-l-none padder-r-none main-column">
<div class="primary-display">
<a href="?id={{::item.url.id}}&table={{::item.url.table}}&sys_id={{::item.url.sys_id}}" sn-focus="{{::item.highlight}}" aria-label="{{::item.display_field}} , {{::item.display_number}}"> {{::item.display_field}} </a>
</div>
<small class="text-muted">
<div ng-repeat="f in item.secondary_displays" class="secondary-display">
<span >{{::f.display_value}}</span>
</div>
</small>
</div>
<div role="cell" class="col-xs-3 padder-l-none padder-r-none state-column">
<div class="state">
<span> {{::item.state}}</span>
</div>
</div>
<div role="cell" class="col-xs-3 padder-l-none padder-r-none updated-column">
<div class="updated">
<i class="fa fa-clock-o" aria-hidden="true" title="${Updated}"></i>
<sn-time-ago timestamp="::item.updated_on"/>
</div>
</div>
<div role="cell" class="col-xs-3 padder-l-none padder-r-none state-priority">
<div class="priority">
<span> {{::item.priority}}</span>
</div>
</div>
</li>
</ul>
</div>
2. Update the Server Script
In the cloned widget's Server Script, add the following line at line 255:
record.priority = gr.getDisplayValue('priority');
Result:
If you need more context or assistance, the reference file is attached for review.
If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Pooja.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 05:02 AM - edited 11-25-2024 05:13 AM
Hello @Lavanya Damotha ,
For that you need to Clone OOB "My Requests" Widget
After clone that widget follow these steps:
1. Update the HTML Template
In the cloned widget's HTML Template, update the code between lines 116 to 155 with the following:
<div role="table" ng-if="c.data.request.req_list.length > 0" class="table" aria-label="{{::data.messages.myRequestsTitle}}">
<div ng-show="::!data.is_associated_ticket_tab" role="rowgroup" class="column-headers">
<div role="row" class="list-group-item table-responsive">
<span role="columnheader" class="col-xs-3 padder-r-none padder-l-none">${Request}</span>
<span role="columnheader" class="col-xs-3 padder-r-none padder-l-none">${State}</span>
<span role="columnheader" class="col-xs-3 padder-r-none padder-l-none">${updated_capital}</span>
<span role="columnheader" class="col-xs-3 padder-r-none padder-l-none">${Priority}</span>
</div>
</div>
<ul role="rowgroup" class="padder-l-none padder-r-none">
<li role="row" class="list-group-item table-responsive" ng-repeat="item in c.data.request.req_list | limitTo: c.data.lastLimit track by item.sys_id" style="margin:0px" >
<div role="cell" class="col-xs-3 padder-l-none padder-r-none main-column">
<div class="primary-display">
<a href="?id={{::item.url.id}}&table={{::item.url.table}}&sys_id={{::item.url.sys_id}}" sn-focus="{{::item.highlight}}" aria-label="{{::item.display_field}} , {{::item.display_number}}"> {{::item.display_field}} </a>
</div>
<small class="text-muted">
<div ng-repeat="f in item.secondary_displays" class="secondary-display">
<span >{{::f.display_value}}</span>
</div>
</small>
</div>
<div role="cell" class="col-xs-3 padder-l-none padder-r-none state-column">
<div class="state">
<span> {{::item.state}}</span>
</div>
</div>
<div role="cell" class="col-xs-3 padder-l-none padder-r-none updated-column">
<div class="updated">
<i class="fa fa-clock-o" aria-hidden="true" title="${Updated}"></i>
<sn-time-ago timestamp="::item.updated_on"/>
</div>
</div>
<div role="cell" class="col-xs-3 padder-l-none padder-r-none state-priority">
<div class="priority">
<span> {{::item.priority}}</span>
</div>
</div>
</li>
</ul>
</div>
2. Update the Server Script
In the cloned widget's Server Script, add the following line at line 255:
record.priority = gr.getDisplayValue('priority');
Result:
If you need more context or assistance, the reference file is attached for review.
If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Pooja.