Need to create a dropdown field in ui page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2021 11:02 PM
Please Urgent Requiremnet.......!!!!!!!!!!!!!!!!
Hello everyone,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2021 11:17 PM
Hi Vinod,
refer these links below
Need help with Jelly script in UI Page using dropdown options
Regards
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
03-30-2021 11:59 PM
Thanks for the reply
Could you please help me with the code that helps me alot, its an urgent requirement.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2021 12:32 AM
Hi,
Sample script below I am showing 10 INC numbers in drop down
HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<html>
<style>
.color-class
{
color:red;
}
.color-blue-class
{
color:blue;
}
</style>
<p class="color-class">hello</p>
<p class="color-red-blue">Blue Color</p>
<g:evaluate jelly="true" object="true">
var inc = new GlideRecord('incident');
inc.setLimit(10);
inc.query();
inc;
</g:evaluate>
<select name="tables" id="selected1">
<j:while test="${inc.next()}">
<option value="${inc.number}">${inc.number}</option>
</j:while>
</select>
</html>
</j:jelly>
Output:
Regards
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
03-31-2021 12:49 AM
Hi
Thanks for the code,
I After selecting the incident and i press ok button then it should redirect to home page, For that could you send me the script for that.
Thanks.