Button Widget - Process Update -Continue' - doesn't work when using pre-launch script

257 views
Skip to first unread message

onei...@gmail.com

unread,
Aug 27, 2014, 6:08:56 AM8/27/14
to suppor...@runmyprocess.com
Hi

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));
};

Bidisha Das

unread,
Aug 27, 2014, 6:36:48 AM8/27/14
to suppor...@runmyprocess.com, onei...@gmail.com
Hi,
Please use col_employeedialogue.saveCallback(my_object,{},add_ok,add_ko); You have missed {} in your code.Also you can use" true;" at last in your code.Even if you don't use,it will run,but its a good practice if you use it.

Thanks & Regards
Bidisha

onei...@gmail.com

unread,
Aug 28, 2014, 4:35:34 AM8/28/14
to suppor...@runmyprocess.com, onei...@gmail.com
Hi Bidisha

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

onei...@gmail.com

unread,
Aug 28, 2014, 8:35:25 AM8/28/14
to suppor...@runmyprocess.com, onei...@gmail.com
Hi

All working now, sorry hadn't added "true;" at the end as you specified.

thank you :)

Reply all
Reply to author
Forward
0 new messages