- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 05:21 AM
If i use this:
<g:evaluate var="jvar_myvar" jelly="true" object="true">
var inc = new GlideRecord('incident');
inc.setLimit('5');
inc.addQuery('active' , 'true');
inc.query();
inc;
</g:evaluate>
<j:while test="${jvar_myvar.next()}">
<button>${jvar_myvar.getValue('number')}</button>
</j:while>
i am able to create a Button for each GlideRecord Element.
Now i need a Solution to give that Buttons a Value and use this Value in the CS.
For Example:
I have 5 Buttons with there Incident Numbers.
Each Numbers should also be the Value of each Button
And if i click on one of these Button, the Value should be written in a Field on the Incident Form.
Without the Value, the Button appears with the Groupname (its another example)
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 06:09 AM
I think the issue may be elsewhere... Let me take a jab now.
Replace your button code with this:
<button type="button" onclick="updateField('${jvar_group_buttons.getValue('sys_id')}')">${jvar_group_buttons.getDisplayValue('group')}</button>
The assignment group is a reference field and only loves sysid.
Edit : ADDED THE TYPE ATTRIBUTE TO THE BUTTON and changed value to sys id
This should work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 06:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 06:09 AM
So it seems to be, that after i click on the new Button, the UI Page replace the form and shows only the Button.
The INC Form is not visible

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 06:09 AM
I think the issue may be elsewhere... Let me take a jab now.
Replace your button code with this:
<button type="button" onclick="updateField('${jvar_group_buttons.getValue('sys_id')}')">${jvar_group_buttons.getDisplayValue('group')}</button>
The assignment group is a reference field and only loves sysid.
Edit : ADDED THE TYPE ATTRIBUTE TO THE BUTTON and changed value to sys id
This should work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 06:28 AM
The cause was the button type.
Thank you, sometimes it's that simple.
I used the ability to pass values through functions 20 times a day.
But as soon as you have something to do with something else (jelly)
you can no longer get down to the basics and think too complicated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 06:32 AM
lol yeah 😄