{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1315,"path":"api-reference/web-services/r_Priority1IncidentsExample.md","title":"Priority 1 incidents example","bundle":null,"doc_type":null,"release":"australia","body":"\n# Priority 1 incidents example\n\nThis example scrolling element demonstrates how to create a UI macro to a scrolling list of priority 1 incidents.\n\nUse the following example code:\n\n```\n<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<j:jelly trim=\"false\" xmlns:j=\"jelly:core\" xmlns:g=\"glide\" xmlns:j2=\"null\" xmlns:g2=\"null\">\n  <g2:evaluate var=\"jvar_inc\">\n    var inc = new GlideRecord('incident');\n    inc.addActiveQuery();\n    inc.addQuery('priority',1);\n    inc.query();\n  </g2:evaluate>\n \n  <div style=\"background-color:DDDDDD; padding-left:10px; line-height:19px; border:2px white solid\" width=\"100%\" nowrap=\"true\">\n    Priority 1 Incidents:\n    <input id=\"make_spacing_ok\" style=\"visibility:hidden;width:0px:\" title=\"\"/>\n  </div>\n  <g2:scrollable_area height=\"100px\" width=\"100%\"> \n \n      <j2:while test=\"$[inc.next()]\">\n        <j2:set var=\"jvar_inc_link\" value=\"incident.do?sys_id=$[inc.sys_id]\"/>\n        <j2:set var=\"jvar_inc_list_link\" value=\"incident_list.do?sysparm_query=active=true\"/>\n        <span style=\"line-height: 10px; padding-left:10px\">    \n          <a href=\"$[jvar_inc_link]\">\n            <IMG SRC=\"images/services.png\" style=\"padding-right:10px\"></IMG>\n          </a>\n          <a href=\"$[jvar_inc_link]\" style=\"padding-right:10px; color:blue\">$[inc.number]</a>\n            $[inc.short_description]\n        </span>\n        <br style=\"line-height:5px\"/>\n      </j2:while>\n      <span>\n        <a href=\"$[jvar_inc_list_link]\" style=\"color:blue; padding-left:10px\">View all active incidents</a>\n      </span>\n \n  </g2:scrollable_area> \n</j:jelly>\n```\n\nNavigate to **System UI** &gt; **Formatters** and create a Formatter that refers to the UI Macro above.\n\n**Parent Topic:**[Add scrolling elements in forms](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/t_AddingScrollingElementsInForms.md)\n\n"}}