Multiple values store in one variable

Debarpita Basak
Giga Contributor

Hi All,

How i can store multiple values in one varible and join with comma , by current sys_id  i am getting two sysid  i want store two sys_id in one variable ?  

in ui action var sys_id = current.sys_id;// getting two sys_id want to join in one variable
var arr = [];

var SYSID = arr.join(',');
gs.addInfoMessage(SYSID);

1 ACCEPTED SOLUTION

@Debarpita Basak 

I am already responding on this thread.

So if you think I answered your original question of setting the number field with the list of RITMs selected then mark my response as correct and close this question.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

25 REPLIES 25

Hi Ankur ,

It is reloading the ritm list view page. Kindly suggest  and ui action table is sc_req_item

Hi,

that script should take user to new sc_task record and populate the number with the selected RITMs

can you please share the latest script you are using with screenshot

Also share the number field dictionary configuration

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

it is reloading the form not opening the new form of task. Kindly suggest

@Debarpita Basak 

you missed this.

Client checkbox should be true

Onclick field should have this - sendCustomEmail();

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi ankur,

it is working. I want to store selected ritm requested for want to store in 'To' field(field type is list) in sc_task new form after clicking ui actionLike it is storing number with selecting ritm . Kindly  suggest