I'm trying to develop a catalogue item uses multi row variable sets. Most of the columns on the catalogue item are populating correctly as required. However, I'm having an issue with one of the columns:

What I've noticed is that if select my option for a New Platform, the 'New Lab Level/Platform Child' column is immediately set to null, even though the option for my new Lab has not been selected. When trying to select a new Lab, the available options don't load.
My Script Include is:
var LBGGetApplicationDetails = Class.create();
LBGGetApplicationDetails.prototype = Object.extendsObject(AbstractAjaxProcessor, {
existing_app_srvc: function() {
var aps_value = [];
var ci_sysid = this.getParameter('sysparam_ci_sysid');
var ci_new_platform = this.getParameter('sysparm_platform');
var ci_new_lab = this.getParameter('sysparm_lab');
var grapp = new GlideRecord('cmdb_ci_business_app');
grapp.addQuery('sys_id', 'IN', ci_sysid);
grapp.query();
while (grapp.next()) {
var row = {
'business_application_number_variable_set': grapp.number.toString(),
'business_application_owner_variable_set': grapp.u_business_owner.getDisplayValue(),
'business_application_name_variable_set': grapp.name.toString(),
'current_business_owning_platform_variable_set': grapp.u_business_owning_division.getDisplayValue(),
'new_platform_variable_set': ci_new_platform,
'new_lab_level_platform_child_variable_set': ci_new_lab,
};
aps_value.push(row);
}
return JSON.stringify(aps_value);
},
type: 'LBGGetApplicationDetails'
});
There are two client scripts for the Lab field:
The below client script is an on change client script for the selected Lab:

function onChange(control, oldValue, newValue, isLoading) {
//If form is loading, do nothing
if (isLoading) {
return;
//If the list of Business Applications to update is cleared, clear the Multi Row variable set
} else {
var gr = new GlideAjax('LBGGetApplicationDetails');
gr.addParam('sysparm_name', 'existing_app_srvc');
gr.addParam('sysparam_ci_sysid', g_form.getValue('business_applications_to_update'));
//gr.addParam('sysparam_u_business_owning_division', current_owning_platform);
if(newValue != null){
gr.addParam('sysparm_lab', g_form.getDisplayValue('new_lab_department'));
}
else{
gr.addParam('sysparm_lab', '');
}
gr.getXML(parseScript);
}
}
function parseScript(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
var arr = JSON.parse(answer);
if (arr.length > 0) {
g_form.setValue("selected_business_applications", answer);
} else if (arr.length == 0) {
g_form.setValue("selected_business_applications", []);
}
}
The below client script is an on change client script for the selected Business Applications:

function onChange(control, oldValue, newValue, isLoading) {
//If form is loading, do nothing
if (isLoading) {
return;
//If the list of Business Applications to update is cleared, clear the Multi Row variable set
} else if (newValue == '') {
g_form.setValue('selected_business_applications', []);
//Each time a Business Application is added, add a row for each Business Application with the other variables
} else {
var gr = new GlideAjax('LBGGetApplicationDetails');
gr.addParam('sysparm_name', 'existing_app_srvc');
gr.addParam('sysparam_ci_sysid', newValue);
//gr.addParam('sysparam_u_business_owning_division', current_owning_platform);
if(g_form.getValue('new_platform') != null){
gr.addParam('sysparm_platform', g_form.getDisplayValue('new_platform'));
}
if(g_form.getValue('new_lab_department') != null){
gr.addParam('sysparm_lab', g_form.getDisplayValue('new_lab_department'));
}
gr.getXML(parseScript);
}
}
function parseScript(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
var arr = JSON.parse(answer);
if (arr.length > 0) {
g_form.setValue("selected_business_applications", answer);
} else if (arr.length == 0) {
g_form.setValue("selected_business_applications", []);
}
}