Create DB in RMP

459 views
Skip to first unread message

maybeg...@gmail.com

unread,
Apr 9, 2014, 2:52:02 PM4/9/14
to suppor...@runmyprocess.com
Hi

Do you know how could I create a DB in RMP?

I mean I need to create a "search input widget" and use it to find anything in a DB defined before.

For example: a DB of supliers. Any user can register a web form with the name, address, Code and phone number of the supplier.

But I need that an input widget can compare info with the DB of suppliers, and if the name is the same, autocomplete all the widgets(address, code and phone number).


Could you show me an approach to make this?

I really appreciate it, thanks.

Att:
nes

Richard Manga

unread,
Apr 9, 2014, 6:25:14 PM4/9/14
to suppor...@runmyprocess.com
Hi,

When you want to create a DB in RMP, you just need to create a new collection.

We have an auto-complete widget that allows you to retrieve data as you want.

In the following link, you will find an example that explains exactly what you want to do.


Regards,

Richard Manga



--
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/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/f112683d-7868-4609-8e4b-e5e4143b65d2%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

maybeg...@gmail.com

unread,
Apr 11, 2014, 3:07:47 PM4/11/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Thanks Richard.

I've created a new collection and I understand how to use the autocomplete widget with the data stored.

But I have a basic question, How could I add info to this collection?, I mean could you show me the easiest way to fill this collection in a basic example?

I don't undestand how the collection works, I know it's a local database for RMP. For example, if I have 2 input fields in a WI, how can I store the info that is registered from an inputtext widget into a determined collection?


I really appreciate it.

att:
Nes

Richard Manga

unread,
Apr 11, 2014, 6:10:18 PM4/11/14
to suppor...@runmyprocess.com, Nesgeek Cepeda
Hi,

If you have two input text fields for example, with variable names "variable_1" and "variable_2", the following code allow you to insert these information inside your collection:

function add_ok(result) {
alert("ok " + JSON.stringify(result));
}

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

var my_object = {};
my_object.firstname = RMPApplication.get("variable_1");
my_object.last_name =RMPApplication.get("variable_2")
my_object.phone_number = "0666666666"; col_clients.saveCallback(my_object,add_ok,add_ko);

When you use a collection in your web interface, you should click on the tab "Collection" of your web interface design page, and add the collection in your web interface. This will generate automatically and id for your collection (For example, if you add collection "clients" to your web interface, the id generated will be "col_clients").

In the previous example, you will add a record inside your collection "clients". This record has 3 properties: firstname, last_name, phone number.

In the following link, you can find more details about the collections:


Regards,

Richard Manga.


att:
Nes

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

maybeg...@gmail.com

unread,
Apr 23, 2014, 12:25:13 PM4/23/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Hi Richard.

I did a test but I don't know why I can't visualize the info inside my collection.
I need that the info register in the input fields will be saved when the user click on submit button.


Some image are attached about this.

Thanks!!!
Att: nes

input fields.PNG
web interfaces with report widget.PNG
WI with the input fields.PNG
Wi with the report widget.PNG

Richard Manga

unread,
Apr 23, 2014, 12:34:22 PM4/23/14
to suppor...@runmyprocess.com, Nesgeek Cepeda
Hi,

From the first screenshot, I see that you insert null values (null = empty) inside the collection. 

So, in your report, there are some rows that are all empty. If you want to put inserted data in the collection, please add a button (register information) that executes script, and associate the scripts that create records in the collection to this button.

Note: The collection report displays the content of your collection (data registered: in your case it's null/empty because you didn't insert any data in the field).

Regards,

Richard Manga.


Att: nes

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

maybeg...@gmail.com

unread,
Apr 23, 2014, 12:47:50 PM4/23/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Thanks for your answer Richard.

I created the button to execute the script, but it still shows nothing on the WI with the report widget that contains the collection.

I attaches more images.

Att:
nes

Register information button.PNG
WI with the reportWid.PNG

Richard Manga

unread,
Apr 23, 2014, 12:54:40 PM4/23/14
to suppor...@runmyprocess.com, Nesgeek Cepeda
Hi,

Please can you send me your script?

Regards,

Richard Manga



Att:
nes

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

maybeg...@gmail.com

unread,
Apr 23, 2014, 1:02:04 PM4/23/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Hi Richard
This is the script I put inside my JS register information button.
//

function add_ok(result) {
alert("ok " + JSON.stringify(result));
}

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


var my_object = {};

my_object.nombre = RMPApplication.get("proveedor_var");
my_object.nit =RMPApplication.get("nit");
my_object.domicilio =RMPApplication.get("domicilio");
my_object.telefono =RMPApplication.get("telefono");


col_proveedores.saveCallback(my_object,add_ok,add_ko);

//


Thanks.
att: nes

Wi with the report widget.PNG

Richard Manga

unread,
Apr 23, 2014, 1:13:22 PM4/23/14
to suppor...@runmyprocess.com, Nesgeek Cepeda
Hi,

Your JS is ok. In your web interface, go to the tab "Collections" and check that the collection "proveedores" is added this tab.

If not, add it.

Regards,

Richard Manga.


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

Richard Manga

unread,
Apr 23, 2014, 1:36:19 PM4/23/14
to suppor...@runmyprocess.com, Nesgeek Cepeda
Hi,

I added an offer POC (proof of concept) to your account. The problem was that the previous free trial expired.

The free trial will be extended until 23th June.

Can you check if everything is ok now?

Regards

Richard Manga.

maybeg...@gmail.com

unread,
Apr 23, 2014, 3:26:43 PM4/23/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Thanks for your answer mister Richard


I check the collection tabs in each of the WI, and the "proveedores" as collection is selected, but it still doesn't show anything in the WI report.

Do you know could be the problem?

Thanks.

att:
nes

Richard Manga

unread,
Apr 23, 2014, 6:40:51 PM4/23/14
to suppor...@runmyprocess.com, Nesgeek Cepeda
Hi, 

I make a listCallback (list all objects) in your collection, using the following code:

function ok(result){alert(JSON.stringify(result));}
function ko(){alert("KOOOOOO");}
col_proveedores.listCallback({},{},ok,ko);

In the attached file, you will find the content of all your collection.

The problem was that you didn't include all the properties (columns) of your collection in your report. I did that for you,

So if you open the web interface "Proveedores", you should see all the content of your collection.

Regards,

Richard Manga.


nes

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

maybeg...@gmail.com

unread,
Apr 24, 2014, 10:49:57 AM4/24/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Thanks Richard

It works now.

I have a question ,how can I sort this info from the latest to the oldest one?, I need that it shows automatically when the WI is opened.
I mean how can I do this in the report widget?


I really appreciate your help.

att:
nes

Sabine El Rassy

unread,
Apr 24, 2014, 10:56:16 AM4/24/14
to RunMyProcess Support Forum, Nesgeek Cepeda
Hello,

You can add the following code in the Query parameter of your collection report:
{"$query":{},"$orderby":{"your_date_variable_sec":-1}}

Regards,


Sabine EL RASSY

Customer Solutions Engineer

     
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.



att:
nes

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

maybeg...@gmail.com

unread,
Apr 24, 2014, 11:16:34 AM4/24/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Thanks for your answer Sabine.


So "your_date_variable_sec" should be from another column created like a "timestamp" in the report widget, right?

Or is it more simple? could you show me a simple approach?

Thanks.

Sabine El Rassy

unread,
Apr 24, 2014, 1:03:01 PM4/24/14
to RunMyProcess Support Forum, Nesgeek Cepeda
You're welcome.
If you don't have a column, you can try the follow:
{"$query":{},"$orderby":{"_id":-1}}


Regards,

Sabine EL RASSY

Customer Solutions Engineer

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

maybeg...@gmail.com

unread,
Apr 24, 2014, 1:46:55 PM4/24/14
to suppor...@runmyprocess.com, maybeg...@gmail.com
Thanks!!!

It works pretty well.

I'm glad you give me such help :)

att:
nes

Sabine El Rassy

unread,
Apr 25, 2014, 4:25:39 AM4/25/14
to RunMyProcess Support Forum, Nesgeek Cepeda
You're welcome =)

Regards,

Sabine EL RASSY

Customer Solutions Engineer

     
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.



att:
nes

--
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/.
Reply all
Reply to author
Forward
0 new messages