Load collection into array widget

262 views
Skip to first unread message

jess...@gmail.com

unread,
Oct 5, 2016, 11:53:50 AM10/5/16
to Fujitsu RunMyProcess Developer Community
Hi everyone

I have a question, is it possible to show a collection into a array widget??

I'm building a WI and I need to show dates of a collection, but I would like to use a array widget. How I can do it?


Thank you and regards

Pankaj Kumar

unread,
Oct 6, 2016, 3:11:28 AM10/6/16
to Fujitsu RunMyProcess Developer Community
Hi,

Once you fetched the data from collection, you will get the array of objects from collection. Please use the "transpose" method either in free-marker or java scripts (example is shown in below link)  as per your requirement and assign the transpose array to array widget. Please keep the array widget columns variable name same as collection column name.

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


--
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/f6ff5688-fe1a-4eb4-ab0f-e056062ceeac%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

jessi mj

unread,
Oct 6, 2016, 6:49:13 AM10/6/16
to Fujitsu RunMyProcess Developer Community
Well,

two question,

how I get the array of objects from collection,  with this function id_collection
.listCallback(pattern,options,callbackSuccess,callbackFailure) ?

Once I have the objects to insert into array widget, how  I can insert this object? Because in the Properties Array Widget in the field View or edit script, below Add Row, only I can to do validation after to add a row, but I want to add a row.

Besides inside of each column, what is the Type of widget that I should to put.

Thanks and regards




You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/WobSLn8K0_M/unsubscribe.
To unsubscribe from this group and all its topics, 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/.

Pankaj Kumar

unread,
Oct 6, 2016, 7:09:10 AM10/6/16
to Fujitsu RunMyProcess Developer Community
Hi,

Please find js code below:-


function list_ok(result) {  
  var data1 = JSON.stringify(rmp_transpose(result));
   RMPApplication.set("array_widget_variable_name", data1)
  }
//Note:- rmp_transpose function js code is shared in previous post link.

function list_ko(result) {
    alert("ko=" + JSON.stringify(result));
}

var my_pattern = {};
col_name.listCallback(my_pattern,{},list_ok,list_ko);


Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

Reply all
Reply to author
Forward
0 new messages