- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:35 PM
@Tony Chatfield1 updated the post and an image is added
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 09:01 PM - edited 06-20-2024 09:03 PM
Based on details provided a before update BR like this should work.
var myArray = ['NA', 'NA', 'NA'];
if (u_case_id_1 != '') {
myArray[0] = u_case_id_1;
}
if (u_case_id_2 != '') {
myArray[1] = u_case_id_2;
}
if (u_case_id_3 != '') {
myArray[2] = u_case_id_3;
}
current.u_connect_case_ids = myArray.toString();
//Note edited syntax error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 11:19 PM - edited 06-20-2024 11:37 PM
Updated the script as below and it worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:57 PM
Hi @Anna_Servicenow ,
This is how you can achieve this. write business rule or client script per your requirement.
var caseId1 = 111;
var caseId2 = 200;
var caseId3 = 120;
// Concatenate the values with a comma separator
var caseIdArr = [caseId1, caseId2, caseId3].filter(Boolean).join(', ');
gs.print(caseIdArr);