How to load data into collection from CAPI(external database)

321 views
Skip to first unread message

lad.s...@gmail.com

unread,
Mar 29, 2017, 2:11:15 AM3/29/17
to Fujitsu RunMyProcess Developer Community
Hello Team,

We have used external database(sql server) to load data into RMP web interfaces.To display data in Table format we are using collection report.We have created CAPI which is getting data in JSON format.How we can assign or load that data from CAPI to collection report?

Please help

Thanks,
Satish Lad

Abhilash Sambhare

unread,
Mar 29, 2017, 3:46:46 AM3/29/17
to Fujitsu RunMyProcess Developer Community, lad.s...@gmail.com
Hi Satish,

Good Day.

Please follow below steps:

1.You need to first store the data from CAPI into collection.

2.You can use save_objects freemarker function to store the data into collection.

3.Then take a report widget onto Webinterfaces and configure the report to display the data in it.

4.Please find the link for your reference:

Alternatively,you can use javascript report to display data from CAPI.Please find the link for your reference:https://docs.runmyprocess.com/Developer_Guide/Web_Interface/Design/JavaScript_Report

Thanks & Regards,
Abhilash
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/69a17b92-da15-4014-96f1-001eb7a6b518%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

lad.s...@gmail.com

unread,
Mar 30, 2017, 9:33:43 AM3/30/17
to Fujitsu RunMyProcess Developer Community, lad.s...@gmail.com
Thank you Abhilash. I am able to load data into collection from CAPI but whenever we refresh the web interface url it adds another set of data from database to collection and data is duplicated. I am using following code to load data in collection
col_License.saveCallback(object,add_ok,add_ko);

Please suggest.

2. How to get column value of collection report on button click of each row using javascript?

Please help.

Thanks,
Satish Lad

Collection.PNG

Muralikrishna Kummaragunta

unread,
Mar 31, 2017, 4:56:57 AM3/31/17
to suppor...@runmyprocess.com, lad.s...@gmail.com
Hi Satish,

Please find the related responses.

1) The function 'saveCallback' appends the existed collection data passed in 'object'
"To add an object to a collection, you can use the saveCallback method."

And take a measure that your code doesn't run this statement, during the page refresh and should be called for making new entries into collection.

Once the data is available in collection,
You may use 'updateCallback' function to update existed data for a matched pattern and 'removeCallback' function to clear collection data.
Ref: http://docs.runmyprocess.com/Developer_Guide/Collection/Collection_JS_Freemarker#update-objects

2) Please go through related configurations in user-guide example for better understanding, code section-9.
http://docs.runmyprocess.com/Developer_Guide/Collection/Collections_BackOffice

Each row data will be identified by a Unique ID(for ex:car_id).
When you click on the Edit button, related row's data will be stored in 'result', and will be passed as input into the function "load_item()"
You can retrieve/populate the column wise data from the 'result' object as per business requirement.

Let us know, if you have any other clarifications.

Regards,
Murali
Fujitsu RunMyProcess Support


Thanks,
Satish Lad

--
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/.

Ghanshyam Mule

unread,
Apr 4, 2017, 7:06:09 AM4/4/17
to suppor...@runmyprocess.com, lad.s...@gmail.com
Hi Satish,

Could you please confirm that your issue has been resolved.

Regards,
Ghanshyam

On Fri, Mar 31, 2017 at 2:26 PM, Muralikrishna Kummaragunta <mkumma...@runmyprocess.com> wrote:
Hi Satish,

Please find the related responses.

1) The function 'saveCallback' appends the existed collection data passed in 'object'
"To add an object to a collection, you can use the saveCallback method."

And take a measure that your code doesn't run this statement, during the page refresh and should be called as one.

lad.s...@gmail.com

unread,
Apr 5, 2017, 12:03:36 AM4/5/17
to Fujitsu RunMyProcess Developer Community, lad.s...@gmail.com
Hello Ghanshyam,

Thank you for your help. Data is loaded into collection from CAPI but each time when i refresh the page the another set of database data is adding into collection.Please find attached for code
One more query regarding Login user.
How to get login user email/username using java script?
Any help on this would be much appreciated.

Thanks,
Satish Lad

Load data from CAPI to collection.txt

Abhilash Sambhare

unread,
Apr 5, 2017, 2:14:40 AM4/5/17
to Fujitsu RunMyProcess Developer Community, satish lad
Hi Satish,

Good Day.

The information of users in RMP is stored into user metadata.So , RMP provides inbulit functionality to access the email/username of logged in user.To achieve this you need to internal parameters.

Please use the ${P_connected_user.login} and ${P_connected_user.name} to get email/username of user.

For more details,please refer the link 

Thanks & Regards,
Abhilash  Sambhare
Fujitsu Runmyprocess Support




Thanks,
Satish Lad

--
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/.

lad.s...@gmail.com

unread,
Apr 5, 2017, 8:59:18 AM4/5/17
to Fujitsu RunMyProcess Developer Community, lad.s...@gmail.com
Hello Ghanshyam,

Thank yo for your help. Login username issue is resolved now.

Thanks,
Satish Lad

Reply all
Reply to author
Forward
0 new messages