My form names are all named like 'home_lst_defect' or "defect_frm_main".
How do I cycle through each character to find underscore so I can then trim and use in a method.
Thanks
var x ="home_defect_test"
var div = x.lastIndexOf("_")+1
var y = x.substring(div,x.length)
var myform = 'home_lst_defect'
forms[myform].controller.loadAllRecords() // just an example, do what ever you want to do here....
var _sForm = "home_lst_defect",
_aForm = _sForm.split("_");
// _aForm[0] gives first part
// _aForm[1] gives second part
// _aForm[2] gives third and last part
_sForm = _aForm.join(""); // make a string again without underscores
Users browsing this forum: No registered users and 27 guests