selecting multiple values on a reference field

jyoti29208
Giga Expert

Hi All,

 

Greetings of the day!!

I have field over my change form. That is a reference field listing out all "cancelled and failed changes" in the list.Now the requirement is user should be able to select multiple values over that field. Please suggest me some better ways to implement it.find_real_file.png Currently i am able to select only one value from related list and corresponding title. 

 

Regards,

Jyoti 

1 ACCEPTED SOLUTION

Jotiram Yadav
Tera Expert

Use glide_list field. In that way you can select multiple records.

 

View solution in original post

9 REPLIES 9

In that case you can write one onchange client script on this field. Script should check if it has values more than three.

List field returns comma separated string of sys_ids. You can split this string using comma.

Eg. var str = g_form.getValue('u_failed_change_number');

var arr = str.split(",");

if(arr.length>3){

alert("do not select more than 3 change request");

g_form.clearValue('u_failed_change_number');

}

Hope this helps.

Hit Like/Helpful/Answered as applicable.

Thanks.

Thank you so much . I have implemented the limiting record thing by myself. Thanks again. 🙂

Ravi Kiran6
ServiceNow Employee
ServiceNow Employee

Hi,

 

Follow the community article : Select Multiple values

This will work for your requirement.

 

Regards,

Ravi Kiran T,

@Servicenow

Gurpreet07
Mega Sage

A Glide List or Related list with Edit button. If OOB related list not present then create one.

https://docs.servicenow.com/bundle/kingston-platform-user-interface/page/administer/form-administration/task/t_CreateDefinedRelatedLists.html

Hitoshi Ozawa
Giga Sage
Giga Sage

It won't look the same but slushbucket allows multiple selection on reference fields. slushbucket is of type "List Collector".

https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/use/common_ui_elements/task/t_Use...

Following example is selecting on user table (sys_user).