how do i move data in collection to other collection?

559 views
Skip to first unread message

cupi...@gmail.com

unread,
Nov 13, 2015, 2:12:56 AM11/13/15
to Fujitsu RunMyProcess Developer Community
1. How do I move data in the collection to other collection? (see attach cap1)

this script: move data in 'Customer' collection to 'Store' collection
// move to Store C
function archive_ok(result) {
id_html_msg.setHtml("<font color='green'><i>Item deleted</font><i>");
id_report.refresh();
delete_item(cust_id);
//empty custom widget
RMPApplication.set("my_item", "{}");
RMPApplication.set("action", "add");
}

function archive_ko(result) {
//Error while deleting item from the collection
id_html_msg.setHtml("<font color='red'><i>Error while archive item</font><i>");
}

function archive_item(cust_id)
var my_pattern = {};
my_pattern.cust_id = cust_id;
var my_object = eval('(' + RMPApplication.get("my_item") + ')');
if(!archive_already_exists(my_object.cust_firstname,my_object.cust_lastname)){
// my_object.cust_id = uniqueId();
col_Store.saveCallback(my_object, add_ok, add_ko);
}else{
id_html_msg.setHtml("<font color='red'><i>Item already exists!</font><i>");
}
}

2. I want to create similar to Mass Import User App. (see attach cap2)
I have csv file to import in to collection. Please tell me.

Thanks a lot

cap1.png
cap2.png

Pankaj Kumar

unread,
Nov 14, 2015, 7:19:16 AM11/14/15
to Fujitsu RunMyProcess Developer Community
Hi,

For moving the data from one collection to another collection will be:-
  • Copy record to another collection
  • Delete record from first collection.
Can you share the error if any you are getting while running the script.

2. To create a mass import:-
  • Upload a csv file to RMP and get the file_id from file widget.
  • Create a CAPi using the freemarker marker method "import_objects(file, name, options, drop)", reference methodl ink, and trigger this CAPI on from Web Interface.


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...@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/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/b2a35f79-3f78-466a-bad7-7ca8fba14826%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

Reply all
Reply to author
Forward
0 new messages