Copy value of array field to input field out of array

55 views
Skip to first unread message

freal...@gmail.com

unread,
Nov 5, 2015, 9:44:08 AM11/5/15
to Fujitsu RunMyProcess Developer Community
Hi.
Is it possible copy the value of a input text field of array to one field of input text field outside array?

Bidisha Das

unread,
Nov 5, 2015, 11:00:19 AM11/5/15
to suppor...@runmyprocess.com
Hi,
Yes its possible to do it.You can use the below javascript code on Web Interface:

id_text_outsidearray.setValue(id_array.id_text_insidearray[0].getValue()); with Listen to variables:array.text_insidearray[0]


Thanks & Regards
Bidisha

freal...@gmail.com

unread,
Nov 5, 2015, 11:37:57 AM11/5/15
to Fujitsu RunMyProcess Developer Community
Hi Bidisha.
Thank you very much ;)

freal...@gmail.com

unread,
Nov 9, 2015, 5:52:44 AM11/9/15
to Fujitsu RunMyProcess Developer Community, freal...@gmail.com
Hi.
And if I want that copy of dynamically? If I have a lot of lines in array widget, how I can do this? Because your solutin is just for the first item of array.

Bidisha Das

unread,
Nov 10, 2015, 3:38:41 AM11/10/15
to suppor...@runmyprocess.com
Hi,
In that case,you will need to run the above code with a for loop which will dynamically assign values one after another to the text box from the rows of the array.


Thanks & Regards
Bidisha

freal...@gmail.com

unread,
Nov 10, 2015, 5:31:10 AM11/10/15
to Fujitsu RunMyProcess Developer Community
Hi Bidisha.
Yes. I try did this.

var rows = id_array.getRowsCount();
for(i=0;i<rows;i++)
{
id_text_outsidearray.setValue(id_array.id_text_insidearray[i].getValue());
}

where rows is the number of lines.

Is more or less this?

Bidisha Das

unread,
Nov 10, 2015, 6:54:03 AM11/10/15
to suppor...@runmyprocess.com
Hi,
You will need to store the array of values in JSON fomat(label:value pair) in text box.You can use the below code:

var rows = id_array.getRowsCount();
var arr=new Array();
for(i=0;i<rows;i++)
{
arr.push({"label":id_array.id_text_insidearray[i].getValue(),"value":id_array.id_text_insidearray.getValue()});
id_text_outsidearray.setValue(arr);
}


Thanks & Regards
Bidisha

freal...@gmail.com

unread,
Nov 10, 2015, 6:57:28 AM11/10/15
to Fujitsu RunMyProcess Developer Community
Hi Bidisha. Thank you ;)
Reply all
Reply to author
Forward
0 new messages