Trouble setting an items value with the set method

Hi all, This JavaScript routine is trying to generate a call reference ID based on concatenation of an abbreviated three letter description and an autonumber field in a enquiry logging form. Having trouble setting the three part code using the set method. Having no effect, no error messages as such. Many thanks. Code enclosed below:  // BEGIN USER CODE   var currentNum = mxobj.get("RefCode"); var state = mxobj.get("EnqType"); var currentID = mxobj.get("LogID");   alert ("Default LogID :" + currentID);           switch (state) {                 case "Compliment":                         mxobj.set("LogID", "CMP");                         break;                 case "Complaint":                         alert ("LogID before setting: " + currentID);                         mxobj.set("LogID", "COM");                         alert ("LogID in case: " + currentID);                         break;                 case "Suggestion":                         mxobj.set("LogID", "SUG");                         break;                 case "Late_Submission":                          mxobj.set("LogID", "LTE");                         break;                 case "General_Advice":                         mxobj.set("LogID", "ADV");                         break;                 case "Notification":                 default:                         mxobj.set("LogID", "NOT");                         break;                             }   alert(("Current value: " + currentNum)); alert (("Current ID: " + currentID)); mxobj.set("LogID", (currentID + currentNum)); alert(("Final ID: " + currentID));       // END USER CODE
1 answers

If i am not mistaken “var currentID = mxobj.get("LogID");” does not set a reference but copies the value. Instead of 

alert ("LogID in case: " + currentID);


alert ("LogID in case: " + mxobj.get("LogID");