Created
January 24, 2014 00:24
-
-
Save cmcdevitt/8589692 to your computer and use it in GitHub Desktop.
ServiceNow Jelly Check for Incident
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"> | |
<g:evaluate var="jvar_gr" object="true"> | |
var gr = new GlideRecord("incident"); | |
gr.addQuery("state","=", "2"); | |
gr.addQuery("category","=", "Sales and Service"); | |
gr.query(); | |
gr; | |
</g:evaluate> | |
<j:if test="${!jvar_gr.hasNext()}"> | |
<span>No Reported Outage</span> | |
</j:if> | |
<j:if test="${jvar_gr.next()}"> | |
<span>M: ${jvar_gr.getValue('number')} ${jvar_gr.getValue('short_description')}</span> | |
</j:if> | |
</j:jelly> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment