About array widget

285 views
Skip to first unread message

maybeg...@gmail.com

unread,
Feb 6, 2014, 5:43:55 PM2/6/14
to suppor...@runmyprocess.com
Hello.

I'm trying to do a dynamic array widget.

I need to add people using an array widget then other user sets other variables (using the array widget too) based on the info I added first.

The examples are attached as image of the web interface.

thanks!
att:
Nes

my task.PNG
other one task.PNG

thoshino

unread,
Feb 6, 2014, 9:36:20 PM2/6/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Hi Nes,

In this case, since there are 2 users and are operating in a order, you will use 2 screens.
The array widget will have all the columns configured, active and visible. Let's assume there are 4 columns.

The first screen (can be a launch screen) should hide latter 2 columns.
The second screen should hide the first 2 columns.

This hiding of columns can be done by small edition to the following example:

In above function, where it says "id_array[id_column][i].setActive(false);"
It shuold be "id_array[id_column][i].setVisible(false);"

So, in the first screen execute the above function in Javascript widget.
In second screen, make a very similar JS widget (set the columns to first 2), and set this to active, the one you made for first screen should be inactive.

How does this sound?

Taka

maybeg...@gmail.com

unread,
Feb 9, 2014, 2:25:58 PM2/9/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
It works but only for the first row of the column, the next row doesn't keep this condition.
The code I used, in a JS widget.
///
function unactive_column(id_array, id_column) {
var rows_count = id_array.getRowsCount();
for (var i = 0; i < rows_count; i++) {
id_array[id_column][i].setActive(false);
}
}

unactive_column(id_my_array,"id_my_column");

///

I created 2 JS widget with almost the same code, one for the first user, and the second one for the next user.
All active or visible checkbox in the rules tab, and inside each column are marked.

Some screenshots about my questions are attached.
Thanks!!!

First.PNG
second.PNG
third.PNG

thoshino

unread,
Feb 12, 2014, 1:57:44 AM2/12/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Hi,

I might have misunderstood your question.
If your question was about, value added in 1st screen not displaying correctly in the 2nd screen, you must look into process report, Initial parameters or Computed parameters, to see if the values exist.

Also, about the script I referenced in the previous reply, I think you should go for a different approach.
Please see attached screenshots (wi-design.png/array-js.png/array-js-code.png).

This way, you have 1 Javascript column in array controlling active/inactive, based on a variable called "screen_no".
You can change this value with a separate Javascript widget for each screen (for example, in launch screen the script can be, id_screen_no.setText("1"); or something similar).

As a test, you can open the web interface in test, and manually change the value in screen_no text input to see active/inactive setting change for designated columns in the array.
(like in attached screen1.png/screen2.png)

I hope this will work for you.

Best regards,

Taka
screen1.png
screen2.png
array-js.png
array-js-code.png
wi-design.png

maybeg...@gmail.com

unread,
Feb 12, 2014, 10:56:34 AM2/12/14
to suppor...@runmyprocess.com, maybeg...@gmail.com

I'll inform you about the results Thanks.

Reply all
Reply to author
Forward
0 new messages