- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2019 05:08 AM
how to add options to a choice list/drop down dynamically from table in an ui page.
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2019 05:27 AM
Hi Hemanth,
can you share your code here? also from which table and what field you want to fetch
you can use html select tag to create drop down based on the choice values
sample script here
for example I have used incident table and state column
<g:evaluate var="jvar_gr" object="true">
var gr = new GlideRecord('sys_choice');
gr.addQuery('element', 'state');
gr.addQuery('name', 'incident');
gr.quey();
gr;
</g:evaluate>
<select>
<j:while test="${jvar_gr.next()}">
<option value="${jvar_gr.value}">${jvar_gr.label}</option>
</j:while>
</select>
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2021 11:14 PM
Can you please post this as new question as this thread is quite older?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader