Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 02:49 AM
Hello
If I put the sys_id in the UI Page HTML script, the gliderecord works, but if I insert the variable, it doesn't.
I intentionally write out the value of the variable and it writes out the good sys_id.
Can anyone help?
<j:set var="jvar_pref" value="${sysparm_changeID}"/>
<p>${jvar_pref}</p>
<g:evaluate var="jvar_now_GR" object="true" jelly="true">
var now_GR = new GlideRecord("checklist_item");
now_GR.addQuery('checklist', ${jvar_pref});
now_GR.query();
now_GR;
</g:evaluate>
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 03:04 AM
I found the solution, it has to be put between apostrophes!
<j:set var="jvar_pref" value="${sysparm_changeID}"/>
<p>${jvar_pref}</p>
<g:evaluate var="jvar_now_GR" object="true" jelly="true">
var now_GR = new GlideRecord("checklist_item");
now_GR.addQuery('checklist', '${jvar_pref}');
now_GR.query();
now_GR;
</g:evaluate>
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 03:04 AM
I found the solution, it has to be put between apostrophes!
<j:set var="jvar_pref" value="${sysparm_changeID}"/>
<p>${jvar_pref}</p>
<g:evaluate var="jvar_now_GR" object="true" jelly="true">
var now_GR = new GlideRecord("checklist_item");
now_GR.addQuery('checklist', '${jvar_pref}');
now_GR.query();
now_GR;
</g:evaluate>