HTML:
<div><b>Welcome to the Project Portal</b></div> <div class="row"> <div class="col-xs-6"> <p>This section pulls from the Project Workspace, each card would open that respective project when clicked on. Opens in the new Project Workspace screen</p> </div> <div class="col-xs-6"><p>Pull tasks assigned to the user, no matter what part of SN they are in, need to see what details can be made available to distinguish between them, they should link to the 'entity' that they are related to</p></div> <div class="col-xs-6" style="text-align: center;border:1px solid black;border-radius: 58px;"> <p style="font-size: 20px;color: blue;font-weight: 400;">Your Open Project</p><br> <div ng-repeat="incident in data.incidents" class="ng-scope" style=" border-bottom: 1px solid lightgray; height: 151px; border-right: 1px solid lightgray; box-shadow: 3px 1px lightgray;margin-top: 17px; "><br><span style=" border: 1px solid green; background-color: lightgreen; padding: 5px 5px 5px 5px; color: green;margin-right: 336px;">* Green<br></span><br> <div class="col-xs-12" style=" text-align: left; margin-left: 63px; "> <b class="ng-binding">Network storage unavailable</b> </div> <div class="col-xs-12" style=" text-align: left; margin-left: 64px; height: 31px; "> <img src="10on.png" style="height: 29px;" role="presentation"><b> David Miller</b> </div> <div class="col-xs-6"><b style="margin-right: 53px;">Start Date</b><br>{{incident.sys_updated_on}}</div><div class="col-xs-6"><b style="margin-right: 53px;">End Date</b><br>{{incident.sys_updated_on}}</div><br><br> </div> </div> </div>
[/apcode]
Server Script:
(function() { data.incidents=[]; var gr=new GlideRecord("incident"); gr.addActiveQuery(); gr.setLimit(10); gr.orderByDesc("sys_updated_on"); gr.query() while(gr.next()) { var incident={}; incident.number=gr.getDisplayValue('number'); incident.short_description=gr.getDisplayValue('short_description'); incident.sys_id=gr.getUniqueValue(); incident.sys_updated_on=gr.getValue('sys_updated_on'); data.incidents.push(incident); } })();
Portal Design to Show Open Incidents ServiceNow
Working Code Asked question May 31, 2024