Form Locking Up and Inaccessible for A Few Mins on Dropdown Box Option Update

Form Locking Up and Inaccessible for A Few Mins on Dropdown Box Option Update

I have designed a form which is designed to help a customer choose a Machine and then select a matching product for that machine. This requires the form to via deluge to update the dropdown box's depending on the customer selection.

The returned values are then used to populate fields on the form. 





I am using the customer portal to access the program as this is how my customers will connect to it.

If I change the dropdown box selections, sometimes on the second or third time the form locks up, sometimes it runs 20 or more times no problem. A more complex version of this script would lock up within 4-7 times every time. 


I seem to have found the issue is when the Deluge code goes to fetch the records from another report in the system. (Please excuse all the comments and the workaround which stops the user from changing the dropdown box's more than 20times)

The PF code which is // out also caused a lock up within 4 or 5 changes.

//This first check clears the form to allow for the user to change the UPS make or model without creating unexpected results or searches
//
if(input.UPS_Model = "")
{
//This section will zero off all values that the code at the bottom sets
//This code will allow the user to change the range or model of the UPS without creating unexpected results.
//alert "NUL TEST";
}
//As long as a model has been selected the below code pulls the data out of the UPS product database
else
{
//Sets these variable based on the dropdown box's
MAKESEARCH = input.UPS_Manufacturer;
RANGESEARCH = input.UPS_Range;
MODELSEARCH = input.UPS_Model;
UPSDETAIL = UPS_Product_Cat[Manufacturer == MAKESEARCH && Range_Column == RANGESEARCH && Model == MODELSEARCH];
//This counter stops the user from changing the model more than 5 times as this causes a bug
if(input.UPS_Lookup_Counter < 20)
{
input.UPS_Lookup_Counter = input.UPS_Lookup_Counter + 1;
}
else
{
disable UPS_Range;
disable UPS_Model;
disable UPS_Load_in_KW;
alert "Refresh Screen to Change Model Again";
}
}
//The following code would be the same as long as all the product catalogues have the same column titles
//The next IF statement stops the code running if the user is changing the UPS  make or model
//This IF statement ALSO runs the code for Static or NONE Modular UPS Units Modular UPS Use different Code
if(input.UPS_Model != "" && UPSDETAIL.Modular == "No")
{
input.UPSKVA = toDecimal(UPSDETAIL.KVA_Rating);
//PF is a Decimal in the UPS Product database but the field is a string
//So take the PF as a decimal and assign to a variable
//PFHOLDING = UPSDETAIL.PF;
//Covert the decimal to a string
//PFHOLDINGSTRING = tostring(PFHOLDING);
//Set the Select List with the string 0.7 0.8 0.9 1.0
//UPSPF.select(PFHOLDINGSTRING);
input.UPSPFNUMBER = UPSDETAIL.PF;
//The next Line is a number in both the UPS Info table and the UPS Calculator form
input.UPS_Load_in_KW = UPSDETAIL.KW_Rating;
//This next line is a decimal in the report all the other values are whole numbers
input.Current_Per_Phase_Display_Number = UPSDETAIL.Input_Current_Per_Phase_Max_from_Datasheet_Amps;
//
input.Calculated_Required_Supply_Rating_KW = toDecimal(UPSDETAIL.Input_Rating_Max_from_Datasheet_KW);
//Sets the load percent to 100 for a start
input.UPS_Load_Percent = 100.00;
//The next line converts the current per phase from the datasheet to a decimal on the UPS calculator form
input.Current_Per_Phase_Datasheet = toDecimal(UPSDETAIL.EMBS_Rating_From_Datasheet);
Current_and_KW_Calculate_Flag.select("Flag Up");
}
else if(input.UPS_Model != "" && UPSDETAIL.Modular == "Yes")
{
//This is where the code for Modular UPS Will go
}

Any help as to my error or if this is a bug within Zoho would be appreciated.