-
Notifications
You must be signed in to change notification settings - Fork 51
/
jellyQuery.xml
196 lines (155 loc) · 5.5 KB
/
jellyQuery.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?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_user" object="true">
var u = new GlideRecord("sys_user");
u.orderBy('user_name');
u.addQuery('u_employee_level','>', 4);
u.query();
u;
</g:evaluate>
<table>
<j:while test="${jvar_user.next()}">
<tr>
<td>${HTML:jvar_user.getValue('name')}</td>
</tr>
</j:while>
</table>
</j: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">
<g2:evaluate var="jvar_gr" object="true">
var gr = new GlideRecord('u_table_innovations');
gr.orderBy('number');
gr.query();
gr;
</g2:evaluate>
<j2:if test="$[!jvar_gr.hasNext()]">
Comments not updated for any task on this Project.
</j2:if>
<j2:if test="$[jvar_gr.hasNext()]">
<j2:while test="$[gr.next()]">
<tr align='center'>
<td><b>Task Number:</b></td>
</tr><br></br>
<tr>
<td>$[gr.number]</td>
</tr><br></br>
<tr align='center'>
<td><b>Comments:</b></td>
</tr><br></br>
<tr>
<g2:evaluate var="jvar_updates" object="true">
var upd = gr.comments.getJournalEntry(-1);
var na = upd.split('\n');
na;
</g2:evaluate>
<td><p><j2:if test="$[jvar_updates.length gt 0]">
<j2:forEach var="jvar_upd" items="$[jvar_updates]">
<br/>$[jvar_upd]
</j2:forEach>
</j2:if>
</p></td>
</tr><br></br>
<tr align='center'>
<td><b>-----------------------------------------------------------------------------------------------------------</b></td>
</tr><br></br>
</j2:while>
</j2:if>
</j: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">
<g:evaluate>
var ul = new GlideRecord("sys_user");
ul.get(gs.getUserID());
var mylevel = ul.u_employee_level;
</g:evaluate>
<j:if test="${mylevel > '2'}">
<div id="mgr_corner_header" class="mgr_crn_hdr"><span style="mgr_crn_hdr_txt"><b><u>Managers Only</u></b></span></div>
<div id="mgr_corner">
<div id="mgr_left_box" class="mgr_corner_box">
<b>HR Functions</b>
<ul>
<li><a href="http://address/newhire" target="_blank">Submit a New Hire Request</a></li>
<li><a href="http://address/separation" target="_blank">Submit Separation Request</a></li>
<li><a href="http://address/positionchange" target="_blank">Submit Position Change Request</a></li>
</ul></div>
<!--
<div id="mgr_middle_box" class="mgr_corner_box">
<b>Reports</b>
<ul>
<li><a href="#" target="_blank">Report 1</a></li>
<li><a href="#" target="_blank">Report 2</a></li>
<li><a href="#" target="_blank">Report 3</a></li>
</ul></div> -->
<!--
<div id="mgr_right_box" class="mgr_corner_box">
<b>Initiatives</b>
<ul>
<li><i>Coming Soon!</i></li>
</ul></div> -->
</div>
</j:if>
</j: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">
<g2:evaluate var="jvar_pic" object="true">
var gr = new GlideRecord("u_graham_innovations");
gr.query();
gr;
</g2:evaluate>
<j2:while test="$[jvar_pic.next()]">
<g2:evaluate var="jvar_uPrime" expression="gs.getUser().getUserByID('$[gr.u_ghmi_contact]').getFullName()" />
<g2:evaluate var="jvar_uCr" expression="gs.getUser().getUserByID('$[gr.opened_by]').getFullName()" />
<g2:evaluate var="jvar_sComments" object="true">
var upd = gr.comments.getJournalEntry(-1);
var na = upd.split('\n');
na;
</g2:evaluate>
<table style="border: 1px solid black; border-collapse: collapse;">
<tr>
<td colspan="8" style="border: 1px solid black; border-collapse: collapse; padding: 10px;"><b>$[gr.u_ghmi_title]</b></td>
</tr>
<tr>
<td style="border: 1px solid black; border-collapse: collapse; padding: 10px;"><b>Prime Contact:</b></td>
<td style="border: 1px solid black; border-collapse: collapse; padding: 10px;">$[jvar_uPrime]</td>
<td style="border: 1px solid black; border-collapse: collapse; padding: 10px;"><b>AoE:</b></td>
<td style="border: 1px solid black; border-collapse: collapse; padding: 10px;">$[gr.u_ghmi_aoe]</td>
<td style="border: 1px solid black; border-collapse: collapse; padding: 10px;"><b>Submitted by:</b></td>
<td style="border: 1px solid black; border-collapse: collapse; padding: 10px;">$[jvar_uCr]</td>
<td style="border: 1px solid black; border-collapse: collapse; padding: 10px;"><b>Submitted on:</b></td>
<td style="border: 1px solid black; border-collapse: collapse; padding: 10px;">$[gr.sys_created_on]</td>
</tr>
<tr>
<td colspan="8" style="border: 1px solid black; border-collapse: collapse; padding: 10px;">$[gr.u_ghmi_purpose]</td>
</tr>
<tr>
<td colspan="8" style="border: 1px solid black; border-collapse: collapse; padding: 10px;">
<j2:if test="$[jvar_sComments.length gt 0]">
<j2:forEach var="jvar_sComm" items="$[jvar_sComments]">
<br/>$[jvar_sComm]
</j2:forEach>
</j2:if>
</td>
</tr>
</table>
<br />
</j2:while>
</j:jelly>
=============================
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_delivery_time" jelly="true">
var nameValue = jelly.jvar_cart_item.getDisplayName();
var deliveryValue;
var gr = new GlideRecord("sc_cat_item");
gr.addQuery("name", nameValue);
gr.query();
if(gr.next()){
deliveryValue = gr.delivery_time.getDisplayValue();
}
deliveryValue;
</g:evaluate>
${jvar_delivery_time}
</j:jelly> ]]