I have a button widget which is set to update the Process with a continue command.
it works fine with out a pre launch script. However if i use a pre-launch script, the script runs without error and updates a collection as desired, but the Process does not continue.
The content of mypre-launch script is below:
// CREATE OBECTS TO SAVE IN EMPLOYEE DIALOGUE TABLE IN ONLINE DATABASE
var my_object = {};
my_object.login = id_email.getValue();
my_object.name = id_apraisee.getValue();
my_object.department = id_department.getValue();
my_object.jobtitle= id_job_title.getValue();
my_object.linemanager= id_line_manager.getValue();
my_object.level_v1_1= id_level_v1_1.getSelectedValue();
my_object.went_well_v1_1= id_went_well_v1_1.getValue();
my_object.areas_for_improvement_v1_1= id_areas_for_improvement_v1_1.getValue();
my_object.level_v1_2= id_level_v1_2.getSelectedValue();
my_object.went_well_v1_2= id_went_well_v1_2.getValue();
my_object.areas_for_improvement_v1_2= id_areas_for_improvement_v1_2.getValue();
my_object.level_v1_3= id_level_v1_3.getSelectedValue();
my_object.went_well_v1_3= id_went_well_v1_3.getValue();
my_object.areas_for_improvement_v1_3 = id_areas_for_improvement_v1_3.getValue();
// CALCULATE DATE AND TIME TO DATE STAMP THE EMPLOYEE DIALOGUE
//CALCULATE DATE
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1;
var yyyy = today.getFullYear();
today = dd+'/'+mm+'/'+yyyy;
// CALCULATE TIME
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()
if (mm < 10){
currentTime= hours + ":0" + minutes;
} else {
currentTime= hours + ":" + minutes;
};
// alert("date =" + today + " time = " + currentTime);
my_object.date = today;
my_object.time = currentTime;
// SAVE EMPLOYEE DIALOGUE TO DATABASE
col_employeedialogue.saveCallback(my_object,add_ok,add_ko);
function add_ok(result) {
// alert("ok " + JSON.stringify(result));
};
function add_ko(result) {
// alert("ko " + JSON.stringify(result));
};
I made the change you recommended..
"Please use col_employeedialogue.saveCallback(my_object,{},add_ok,add_ko);"
But after doing so I still have the same problem, the script executes but the Process does not Update
Do you know how I can execute the Script and update the Process with the Button press?
Many Thanks
Jamie
All working now, sorry hadn't added "true;" at the end as you specified.
thank you :)