- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 09:03 AM
I have a jelly choice field (g:ui_choice_input) on a ui page that I'd like to add the incident close codes into. What is the easiest way to do this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 09:22 AM
Hello @Jake Sadler
One way is to use GlideChoiceList to get choice values and use them in select tag.
Example:
<g:evaluate var="jvar_not_important" expression="var choices = GlideChoiceList.getChoiceList('incident', 'category');" />
<select id="list" class="form-control" name="list" aria-required="true">
<g:options choiceList="${choices}" />
</select>
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 09:19 AM
@Jake Sadler Not sure if I understand your requirement, you meant to say that the Choice field in the UI page should display the list of closure codes that are displayed on the incident form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 09:30 AM
Hi, that is correct, I want to display close codes in the choice list for the incident table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 09:22 AM
Hello @Jake Sadler
One way is to use GlideChoiceList to get choice values and use them in select tag.
Example:
<g:evaluate var="jvar_not_important" expression="var choices = GlideChoiceList.getChoiceList('incident', 'category');" />
<select id="list" class="form-control" name="list" aria-required="true">
<g:options choiceList="${choices}" />
</select>
Thanks,
Ali
Thank you,
Ali

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 09:26 AM
If you want to apply query to get particular choice values, you can write GlideRecord to query the sys_choice table. You can find example of same in OOTB UI Page: consumable_split
Thank you,
Ali