Collection parameters as drop down list

299 views
Skip to first unread message

bestfri...@gmail.com

unread,
Jul 21, 2013, 12:07:08 AM7/21/13
to suppor...@runmyprocess.com
hi

Could you please confirm whether we can use Collection parameters as drop down list in RMP?

Example:

Collection -Employee has below parameter

Employee Number,First name,Last name,Email address


Is it possible to use the Employee Number data in collection-Employee for the drop down list in another web interface with in same project.

Thanks alot in advance


Thanks and Regards

Sabine El Rassy

unread,
Jul 21, 2013, 4:51:22 AM7/21/13
to RunMyProcess Support Forum
Hello,

Yes it is possible to display the data in your collection in the drop down list. What you need to do is to select the type of your list as 'Variable Based'. Then you can load the data of your collection using a JS code. Here's an example:

function load_employee_list(){
var options = {};
options.asynchronous = false;
col_employee.listCallback({}, options, load_ok_employee, load_ko_employee);
}

function load_ok_employee(result) {

var employee_list = new Array();
for(var i =0; i< result.length; i++){
project_list.push({"label":result[i].emplyee_name,"value":result[i].employee_nb});
}
var employee_list_RMP = new RMP_List();
  employee_list_RMP.fromArray(employee_list);
RMPApplication.setList("employee_list", employee_list_RMP);

}
function load_ko_employee(result) {alert("Error while loading employee's list");}



Hope I was clear. Don't forget to make your collection 'available' on the needed screen in the 'Collection' tab.

Don't hesitate to get back to me for more information.

Regards,

Sabine EL RASSY

PreSales Consultant

     
Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.



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



bestfri...@gmail.com

unread,
Jul 21, 2013, 11:03:36 PM7/21/13
to suppor...@runmyprocess.com, bestfri...@gmail.com

I tried the same js script with simple webinterface but drop down is empty.

Please find the screenshot for reference

I replaced collection name with my collection name and label and value name with my collection parameter names.

Could you please confirm whether i need to anything to the js or add any listen to variables ???

Please forward me any helpful link with tuitorial project for testing in my local step by step.

collection_js.PNG
collection_wi.PNG

Sabine El Rassy

unread,
Jul 22, 2013, 4:16:04 AM7/22/13
to RunMyProcess Support Forum, bestfri...@gmail.com
Hello,

According to the screenshot I can see that the list varaible and the label variable are empty. 
When you say RMPApplication.setList("employee_list",employee_list_RMP); you are setting the list variable. so what you need to do is to fill the 'List Variable' with 'employee_list'.
You also need to set the label value if you need to use its value somewhere else.

Regards,

bestfri...@gmail.com

unread,
Jul 22, 2013, 4:50:30 PM7/22/13
to suppor...@runmyprocess.com, bestfri...@gmail.com
I followed same steps by setting list variable but it is display empty drop down list.

Please find the attachment for reference.


JS :


function load_employee_list(){
var options = {};
options.asynchronous = false;
col_Datamanagement.listCallback({}, options, load_ok_employee, load_ko_employee);
}

function load_ok_employee(result) {

var employee_list = new Array();
alert(result);
for(var i =0; i< result.length; i++){

project_list.push({"label":result[i].lov_name,"value":result[i].lov_value});
listvariable.PNG

Sabine El Rassy

unread,
Jul 23, 2013, 4:52:23 AM7/23/13
to RunMyProcess Support Forum, Nagasai aytha
Make sure your collection is available and contains data. Fill in the label varaible as well

Regards,

Sabine EL RASSY

PreSales Consultant

     
Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


Sabine El Rassy

unread,
Jul 23, 2013, 4:58:31 AM7/23/13
to RunMyProcess Support Forum, Nagasai aytha
Hello,

Your JavaScript should be launched on load so it should not be listening to any other variable.

Regards,

bestfri...@gmail.com

unread,
Jul 25, 2013, 1:05:49 AM7/25/13
to suppor...@runmyprocess.com, Nagasai aytha

Could you please provide the details how make it launch onload and any working example implementing the above for reference?


Thanks alot in advance


Sabine El Rassy

unread,
Jul 25, 2013, 5:02:55 AM7/25/13
to RunMyProcess Support Forum, Nagasai aytha
If you don't fill the listen to a varaible field, it will be executed by default on load.

Regards
Reply all
Reply to author
Forward
0 new messages