New dynamic list in array with tiems from other array

537 views
Skip to first unread message

com...@vaquerotrading.com

unread,
Dec 22, 2017, 2:33:09 PM12/22/17
to Fujitsu RunMyProcess Developer Community
I need to set dynamic items based on other array column, I tested with a widget list outside the array and its work, but when try to set the same code in the array widget list its doesnt work.

Here is my code in arraycolumn

function rmp_set_vb_list_value(vb_name,vb_value) {
var a = new RMP_List();
a.fromArray(vb_value);
RMPApplication.setList(vb_name,a);
id_addps.id_adpn[0].loadList();
return true;
}

var p=[[Rec.rcpn]].length;
var pen_ps=new Array();
for(i=0;i<p;i++){
pen_ps.push({"label":[[Rec.rcpn]][i],"value":[[Rec.rcpn]][i]});
alert(pen_ps);
}
rmp_set_vb_list_value("vb_items",pen_ps);

Can you help me?

Ghanshyam Mule

unread,
Dec 22, 2017, 5:59:23 PM12/22/17
to Fujitsu RunMyProcess Developer Community, com...@vaquerotrading.com

Hello Sir,

As per requirement you want to set array data to variable based(Dynamic) list into array widget.

Consider an array named dynamic_array & its content is in json array format as given below

[{"label":"small","value":"small"},{"label":"large","value":"large"},{"label":"Medium","Value":"Medium"}]

Now these array contents need to set array widget's variable based list

var dynamic_list = new RMP_List();    // Firstly creates empty list

dynamic_list.fromArray(dynamic_array);      //fromArray() sets a "RunMyProcess List" from a json array

RMPApplication.setList("my_array.list_var",dynamic_array);   //using setList() function sets list content to variable list

my_array :- value variable of array widget
list_var:- list variable of variable based list from array widget

Hope this help you.

Please feel free to contact us.

Best regards,
Ghanshyam



--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/2ff4a709-3d75-43aa-9858-2347a8c05e0e%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

com...@vaquerotrading.com

unread,
Dec 22, 2017, 7:09:14 PM12/22/17
to Fujitsu RunMyProcess Developer Community, com...@vaquerotrading.com
I test the code you provider,buts doesnt work

Ghanshyam Mule

unread,
Dec 22, 2017, 7:38:11 PM12/22/17
to Fujitsu RunMyProcess Developer Community, com...@vaquerotrading.com
Hello Sir,

Sorry mistakenly i had written dynamic_array variable name instead of dynamic_list into setList() function.

The correct code is as follows

RMPApplication.setList("my_array.list_var",dynamic_list);  

Can you please change it & test it again.


regards,
Ghanshyam



--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

com...@vaquerotrading.com

unread,
Dec 24, 2017, 3:16:12 AM12/24/17
to Fujitsu RunMyProcess Developer Community, com...@vaquerotrading.com
Dear Ganshyam

I tested but its continue without work
> To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.

Prachi Chandak

unread,
Dec 26, 2017, 9:35:39 AM12/26/17
to com...@vaquerotrading.com, Fujitsu RunMyProcess Developer Community
Hi There,

Please find below code with some variable name changes in your code itself.

function rmp_set_vb_list_value(vb_name,vb_value) {
var a = new RMP_List();
a.fromArray(vb_value);
RMPApplication.setList(vb_name,a);
return true;
}

var first_arr=new Array();
for(i=0;i<([[array1.array_col]].length);i++){
first_arr.push({"label":[[array1.array_col]][i],"value":[[array1.array_col]][i]});
}

rmp_set_vb_list_value("array2.vb_list",first_arr);

I have assumed two different arrays one having some column array1 (Refer screenshot array1_config.png) and another having a dynamic variable list array2 (Refer screenshot array2_config.png).
According to your requirement whenever you set some value into column of array1 that value should be set into dynamic list of array2. You can do this from the above code.
You just have to call a java-script on listen to variable like this    Inline image 2 

Please let me know if I misunderstood your requirement.

Hope this will help you. Please refer the attachments for more understanding.


Thanks & Regards,
Prachi Chandak
Fujitsu RunMyProcess Support

To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
output_list.png
array1_config.png
array2_config.png

com...@vaquerotrading.com

unread,
Dec 26, 2017, 11:12:49 AM12/26/17
to Fujitsu RunMyProcess Developer Community, com...@vaquerotrading.com
Thanks Prachi Chandak its work right now

On Friday, 22 December 2017 12:33:09 UTC-7, com...@vaquerotrading.com wrote:

Reply all
Reply to author
Forward
0 new messages