Its a list collector variable.
Here is my updated run script code.
var answer = [];
var server_name = current.variables.server_name_s.toString();
var arr = server_name.split(',');
for (var i = 0; i < arr.length; ++i) {
var grCI = new GlideRecord('cmdb_ci');
grCI.addEncodedQuery('sys_idIN' + server_name.toString());
grCI.query();
while (grCI.next()) {
if (current.variables.vendor_support_in_place_approval == 'failed' || current.variables.vendor_support_in_place_approval == 'deviation/exemption provided' && current.variables.rejection_reason3 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason3 + '<br>' + "Failed :" + current.vendor_support_in_place_approval;
if (current.variables.built_as_per_soe_approval == 'failed' || current.variables.built_as_per_soe_approval == 'deviation/exemption provided' && current.variables.rejection_reason1 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason1 + '<br>' + "Failed :" + current.variables.built_as_per_soe_approval;
if (current.variables.infra_design_document_isc_isd_approval == 'failed' || current.variables.infra_design_document_isc_isd_approval == 'deviation/exemption provided' && current.variables.rejection_reason5 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason5 + '<br>' + "Failed :" + current.variables.infra_design_document_isc_isd_approval;
if (current.variables.db_monitoring_tested_approval == 'failed' || current.variables.db_monitoring_tested_approval == 'deviation/exemption provided' && current.variables.rejection_reason7 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason7 + '<br>' + "Failed :" + current.variables.db_monitoring_tested_approval;
if (current.variables.shutdown_started_tested_approval == 'failed' || current.variables.shutdown_started_tested_approval == 'deviation/exemption provided' && current.variables.rejection_reason9 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason9 + '<br>' + "Failed :" + current.variables.shutdown_started_tested_approval;
if (current.variables.version_is_atleast_tweleve_month_from_vendor_eos_approval == 'failed' || current.variables.version_is_atleast_tweleve_month_from_vendor_eos_approval == 'deviation/exemption provided' && current.variables.rejection_reason2 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason2 + '<br>' + "Failed :" + current.variables.version_is_atleast_tweleve_month_from_vendor_eos_approval;
if (current.variables.pre_doat_checklist_approval == 'failed' || current.variables.pre_doat_checklist_approval == 'deviation/exemption provided' && current.variables.rejection_reason4 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason4 + '<br>' + "Failed :" + current.variables.pre_doat_checklist_approval;
if (current.variables.built_as_per_design_approval == 'failed' || current.variables.built_as_per_design_approval == 'deviation/exemption provided' && current.variables.rejection_reason8 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason8 + '<br>' + "Failed :" + current.variables.built_as_per_design_approval;
if (current.variables.backup_restore_tested_approval == 'failed' || current.variables.backup_restore_tested_approval == 'deviation/exemption provided' && current.variables.rejection_reason6 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason6 + '<br>' + "Failed :" + current.variables.backup_restore_tested_approval;
if (current.variables.non_prod_oat_is_passed_approval == 'failed' || current.variables.non_prod_oat_is_passed_approval == 'deviation/exemption provided' && current.variables.rejection_reason11 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason11 + '<br>' + "Failed :" + current.variables.non_prod_oat_is_passed_approval;
if (current.variables.patching_automated_approval == 'failed' || current.variables.patching_automated_approval == 'deviation/exemption provided' && current.variables.rejection_reason10 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.rejection_reason10 + '<br>' + "Failed :" + current.variables.patching_automated_approval;
if (current.variables.csrc_patching_cadence == 'failed' || current.variables.csrc_patching_cadence == 'deviation/exemption provided' && current.variables.sr_rejection_reason2 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.sr_rejection_reason2 + '<br>' + "Failed :" + current.variables.csrc_patching_cadence;
if (current.variables.database_onboarded_to_siem_confirmation_approval == 'failed' || current.variables.database_onboarded_to_siem_confirmation_approval == 'deviation/exemption provided' && current.variables.sr_rejection_reason3 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.sr_rejection_reason3 + '<br>' + "Failed :" + current.variables.database_onboarded_to_siem_confirmation_approval;
if (current.variables.server_privilaged_account_onboarded_to_piam == 'failed' || current.variables.server_privilaged_account_onboarded_to_piam == 'deviation/exemption provided' && current.variables.sr_rejection_reason4 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.sr_rejection_reason4 + '<br>' + "Failed :" + current.variables.server_privilaged_account_onboarded_to_piam;
if (current.variables.account_management_onboarded_to_uam_approval == 'failed' || current.variables.account_management_onboarded_to_uam_approval == 'deviation/exemption provided' && current.variables.sr_rejection_reason5 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.sr_rejection_reason5 + '<br>' + "Failed :" + current.variables.account_management_onboarded_to_uam_approval;
if (current.variables.cis_scan_nessus_scan_passed_confirmation_approval == 'failed' || current.variables.cis_scan_nessus_scan_passed_confirmation_approval == 'deviation/exemption provided' && current.variables.sr_rejection_reason6 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.number, "Rejected Reason :" + current.variables.sr_rejection_reason6 + '<br>' + "Failed :" + current.variables.cis_scan_nessus_scan_passed_confirmation_approval;
if (current.variables.ds_am_av_and_network_protect_with_ips_policy_is_set_to_prevent_or_ms_defender_installed == 'failed' || current.variables.ds_am_av_and_network_protect_with_ips_policy_is_set_to_prevent_or_ms_defender_installed == 'deviation/exemption provided' && current.variables.sr_rejection_reason7 != '')
gr.u_deviation_notes = "Requested Number: " + current.variables.sr_rejection_reason7 + '<br>' + "Failed :" + current.variables.ds_am_av_and_network_protect_with_ips_policy_is_set_to_prevent_or_ms_defender_installed;
gr.update();
}
But still its not working.