Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Multiple choices in Jelly

Dinh Nguyen
Kilo Sage

How to create a multiple choice in Jelly Script as bellow ! Please someone help me ! Thank you so much !

DinhNguyen_0-1700477148395.png

I have tried but the UI not like i expect:

DinhNguyen_1-1700477319331.png

The script as below :

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<select id='filter_variables' class='select2-search' onchange='filterTime()'>
    <option value="">All</option>
    <option value="thisYear">This year</option>
</select>

<select id='filter_variables' class="mySelect for" multiple="multiple" style="width: 100%;">
    <option value="">All</option>
    <option value="thisYear">This year</option>
</select>
</j:jelly>
2 REPLIES 2

Anand Kumar P
Giga Patron

Hi @Dinh Nguyen ,

Try below script

<?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:ui_choice_input_field id="choice_id" name="choice_name" label="${gs.getMessage('Select Option')}" style="height: 500px;">
    <option value="none">${gs.getMessage('--None--')}</option>
    <option value="1">ABC</option>
    <option value="2">CDE</option>
    <option value="3">EFG</option>
    <option value="4">HIJ</option>
    <option value="5">JKL</option>
</g:ui_choice_input_field>

AnandKumarP_0-1700478520603.png


Please mark it as helpful and solution proposed if it serves your purpose.

Thanks,

Anand

Thanks @Anand Kumar P  for reply me ! 

Thank you for your Script but it does not solve my requirement ! The requirement is create a multiple select choices as below:

DinhNguyen_0-1700481616792.png