I am not able to concat sysid to my href link in ui pages (jelly script)

Saroj Patel
Tera Expert

i want to set  all active incident number as hyperlink in my page which will open that incident record.

<?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 gr=new GlideRecord('incident');
		gr.addQuery('active',1);
		gr.query();
	</g2:evaluate>

<table width="100%" border="1" class="myTable">
		
		<tr >
			<td >Incident</td><td >Short Description</td><td>Caller</td>
		</tr>

		<j2:while test="$[gr.next()]">
			
<tr >
	<td ><a href="https://dev108227.service-now.com/incident.do?sys_id="+$[gr.sys_id]>$[gr.number]></a></td>

<td>$[gr.short_description]</td>

<td>$[gr.caller_id.getDisplayValue()]</td>
			</tr>
		</j2:while>
	</table>

 

I am getting this error 

Element type "a" must be followed by either attribute specifications, ">" or "/>".

1 ACCEPTED SOLUTION

harshav
Tera Guru

Hi Saroj,

You can directly do like this.

<a href="https://dev108227.service-now.com/incident.do?sys_id=$[gr.sys_id]">$[gr.number]>Test</a>

 

Thanks

Sreeharsha

View solution in original post

2 REPLIES 2

harshav
Tera Guru

Hi Saroj,

You can directly do like this.

<a href="https://dev108227.service-now.com/incident.do?sys_id=$[gr.sys_id]">$[gr.number]>Test</a>

 

Thanks

Sreeharsha

Thanks Harshav

Its working now.