About a simple pre launched script

390 views
Skip to first unread message

maybeg...@gmail.com

unread,
Feb 7, 2014, 11:57:15 AM2/7/14
to suppor...@runmyprocess.com
Hi.

I need to create a simple prelaunch script.

I tried this:

////
if ([[foot_percentage]] == 100){
true;
} else{
alert(“something is wrong”);
false;
}
////

my code to compute the sum (in a column inside an array widget) is:

////
var total_porcentaje = [[array_p.porcentaje]][P_index];

id_array_p.id_porcentaje[P_index].setText("" + total_porcentaje);
id_array_p.id_porcentaje[P_index].setActive(true);
////

Where the variable foot_percentage is a footer (it has a function "sum", and retrieves all the total sum about a column).
I need that this total sum be equal to 100, otherwise a message will prompt showing an error.

Could you help me?

thoshino

unread,
Feb 7, 2014, 1:51:06 PM2/7/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Hi,

For your sum calculation, you can use a predefined function.
In array widget, set a column to number input, and check footer.

There you should see option to use predefined function, and it has Sum.
Please refer to this article in documentation, your configuration should be the same as "sub total" column.

As you can see, please set both the 'listen to variable' and 'Parameter' to your array_variable.number_variable
And also, please set initial value to 0, so that calculation will happen correctly at beginning.

Then, from your script, you can use that footer variable and place business rules (==100) in your pre-launch script.

Best regards,

Taka
Reply all
Reply to author
Forward
0 new messages