2018年8月17日 星期五

[ServiceNow] Simple UI Page using Jelly

<?xml version="1.0" encoding="utf-8" ?>

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<!-- query -- >
<g:evaluate var="jvar_gr" object="true">

 var gr = new GlideRecord("u_email_lookup");

 gr.addEncodedQuery("u_emailINchantaiman@yahoo.com.hk,chantaiman@gmail.com");

 gr.orderBy('u_email_lookup');

 gr.setLimit(1);

 gr.query();

 gr;

</g:evaluate>

 
<!-- iterate gliderecord -- >
<table border="1"> <j:while test="${jvar_gr.next()}"> <tr> <td style="padding:5px"><a href="incident.do?sys_id=${jvar_gr.getValue('u_email')}">${jvar_gr.getValue('u_email')}</a></td> <td style="padding:5px">${jvar_gr.getValue('u_category')}</td> <td style="padding:5px"> ${jvar_gr.getValue('u_subcategory')}</td> </tr> </j:while> </table> </j:jelly>

沒有留言:

張貼留言