Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 06:42 AM
Hi @SyncWizard ,
Try this code.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate>
var options = [];
<!-- Get all the demand tasks assigned to this group -->
var dmnTaskGR = new GlideRecordSecure("dmn_demand_task");
dmnTaskGR.addQuery("assignment_group","cc4909c41b92edd019f6740f8b4bcbd1");
dmnTaskGR.query();
<!-- Get a unique list of short descriptions from these demand tasks -->
while(dmnTaskGR.next()) {
var shortDesc = dmnTaskGR.getValue("short_description");
if(!(options.indexOf(shortDesc) >= 0)) {
options.push(shortDesc);
}
}
</g:evaluate>
<select aria-required="false" aria-labelledby="Short description:" name="shortDescInput" id="shortDescInput" style="; " class="form-control">
<option value="none">--None--</option>
<!-- Create an option value for each unique short description value -->
<j:forEach var="jvar_options" items="${options}">
<option value="optVal">${jvar_options}</option>
</j:forEach>
</select>
</j:jelly>
Please mark my answer helpful/accept as solution if it helped you 👍✔️