Custom Lists

583 views
Skip to first unread message

master...@gmail.com

unread,
Jun 30, 2014, 9:57:05 PM6/30/14
to suppor...@runmyprocess.com
Hi,

I am new to this and would like to know if it is possible to import or load data into a custom list to prevent typing it all in?

Thanks in advance

Steve

Bidisha Das

unread,
Jun 30, 2014, 10:04:40 PM6/30/14
to suppor...@runmyprocess.com, master...@gmail.com
Hi,
    Yes offcourse,you can attach your custom list to any project you want & use it over there.
    
    Thanks & Regards
     Bidisha Das
 

master...@gmail.com

unread,
Jun 30, 2014, 10:16:02 PM6/30/14
to suppor...@runmyprocess.com, master...@gmail.com
Thanks. How is this done? Does it need to be in a specific format?

Bidisha Das

unread,
Jun 30, 2014, 10:38:15 PM6/30/14
to suppor...@runmyprocess.com, master...@gmail.com
Hi,
Not at all.You can normally create a custom list in your project & you have option in that where you can attach this custom list to any project you want.Go to project->.new>Customlist->Add line->label & value->save->you will get the url.Below I have attached some screenshots.

Thanks & Regards
Bidisha
Screenshot1.png
Screenshot 2.png

master...@gmail.com

unread,
Jun 30, 2014, 11:03:32 PM6/30/14
to suppor...@runmyprocess.com, master...@gmail.com

I'm sorry but I have no idea what that means. I can create all of that. I'm not sure you understand the issue I am facing. I dont want to manually type in all of the values into a custom list. I want to know if there is the ability to import values into a list. I have a number of lists that will require over 50 records each.

Thanks

Steve

Bidisha Das

unread,
Jun 30, 2014, 11:05:35 PM6/30/14
to suppor...@runmyprocess.com, master...@gmail.com

master...@gmail.com

unread,
Jun 30, 2014, 11:22:01 PM6/30/14
to suppor...@runmyprocess.com, master...@gmail.com
On Tuesday, July 1, 2014 3:05:35 PM UTC+12, Bidisha Das wrote:
> Hi,
> You can refer to the following link: http://docs.runmyprocess.com/User_Guide/Development_Environment/Toolbox/Custom_Lists

Again. I can do this already! Is there some documentation that will detail how to upload data into a custom list or show how external data can be applied to a custom list?

Bidisha Das

unread,
Jun 30, 2014, 11:38:05 PM6/30/14
to suppor...@runmyprocess.com, master...@gmail.com
Hi,
You can pass your record in json format in a variable in process & add the connector "Create Custom List" to your process,so it would automatically extract your data into the custom list without manually entering into it.

Thnaks & Regards
Bidisha

thoshino

unread,
Jul 1, 2014, 8:49:47 AM7/1/14
to suppor...@runmyprocess.com, master...@gmail.com
Hi Steve,

Let me help you solve your issue.

First of all, YES you can create and update a custom list systematically, using our internal APIs.

Basic steps needed are,
1. Prepare custom list information as CSV, JSON, or XML. It should have "label" and "value" columns/keys.
2. Upload these to RMP.
3. Use internal APIs to feed these into custom lists. 2 different APIs available: create and modify (=update).

It is easiest to call these APIs by creating a Process, and APIs are provided as Connectors in our Connectors Library you can use freely.
Your process will be very simple, 1 or 2 steps. You need to use Freemarker function to read contents of the file you uploaded.

Attached is connector library screenshot.
There is one more connector called Modify if you need that one.

Here is user guide for Freemarker function to read file content:

I hope this helps!

Taka



2014-07-01 05_40_15-RunMyProcess.png

master...@gmail.com

unread,
Jul 1, 2014, 9:43:08 PM7/1/14
to suppor...@runmyprocess.com, master...@gmail.com

Thanks for the reply,

How do I ascertain what the file format of the csv is?
Also, is there an example that I can follow to establish a process for importing data?

thanks

Steve

thoshino

unread,
Jul 2, 2014, 12:54:08 AM7/2/14
to suppor...@runmyprocess.com, master...@gmail.com
Hi Steve,

I don't have an example to show you, but here is the sequence of Freemarker scripts you need.
If you are doing it in a process (which should be the easiest approach), you can use Freemarker function to update custom lists.

[Big picture]
0. Preparation: find out File ID and Custom List ID to be used in the process.
1. Read data from CSV, and make a JSON array.
2. Send the JSON array into the RMP API, along with Custom List ID.

[Steps]
0.1 Custom List ID: In your project, create a custom list. Contents can be empty or random, will be overwritten by API call. 
After you save the custom list, the should be a URL for this list looking like: "live/1111111111111111/data/dc8d41f0-c65d-11e3-8192-123139225512?P_version=${P_version}&P_mode=${P_mode}"
The Custom List ID is the part after /data/, it should look like this: "dc8d41f0-c65d-11e3-8192-123139225512"

0.2 File ID: In your project, go to Files tab, upload your CSV. 
In this example, lets keep it simple and have just 1 column (thus, label and value of the list will be same), no column header needed - start data on the first row.
After you upload the file, you can click on it in the IDE, and there should be a Id that looks like this: "e4992a20-c63b-11e3-8192-123139225512"

Then, let's make a process with 2 activity boxes. 1st box represent Big Picture 1.

1.1 Define variables in process.
In the first activity, keep its type None, and in input variables tab, make 2 variables whose names are "file_id" and "list_id".
In the values of these 2 variables, copy paste the information you got in steps 0.1 and 0.2. - here it is hardcoded values, you can later make this dynamic values. 

1.2 Read CSV Content.
In the output variables tab of the same activity, create a variable whose name is "csv_content".
In the value of this, write this Freemarker (FM) script - this will read the file content and make it accessible as a process variable in following steps.

${file_content(file_id, "none")}

1.3 Create list data JSON array.
In the same tab, create another variable whose name is "list_data".
In the value of this, write this FM script - this is looping through each row of the CSV, making a JSON array of "label" and "value" pairs.

<#assign my_array=[]>
<#list csv_content?split("\r\n") as x>
<#assign my_object>
{"label":"${x}","value":"${x}"}
</#assign>
<#assign my_array=my_array?eval + [my_object?eval]>
</#list>
${my_array}

2.1 Update custom list
Now lets move to next activity, which represent Big Picture 2.
In the output variables tab, create a variable whose name is "list_updated".
In the value of this, write this FM script - a RMP FM function to update a custom list.

${save_custom_list(list_id, list_data)}

When you are ready, you can execute this from Launch Test button.
After you check the process completed with all green, your custom list should be updated with CSV content.

I have attached several screenshots to help you guide.

Lastly, in all of the above steps, it is not necessary to use the exact same variable names, or have exactly 2 steps, etc.
It is up to you to be creative.

Best regards,

Taka
5.png
1.png
2.png
3.png
4.png

master...@gmail.com

unread,
Jul 2, 2014, 7:19:07 PM7/2/14
to suppor...@runmyprocess.com, master...@gmail.com
Thanks for this Taka,

Slight issue with point 0.2 in that I dont have the ability to upload a file

Steve
rmp 1.png

thoshino

unread,
Jul 2, 2014, 7:42:56 PM7/2/14
to suppor...@runmyprocess.com, master...@gmail.com
Hi Steve,

You should open your Project, and go to that Files tab inside your Project.

Why: All resources under Projects are protected by Access rights set for each Project, and Files are by default using this access control.

Sorry I didn't explain that part.
Let me know if you have trouble finding this.

Best regards,

Taka

master...@gmail.com

unread,
Jul 2, 2014, 9:57:14 PM7/2/14
to suppor...@runmyprocess.com, master...@gmail.com

Thanks for all of this Taka,

I have gone through and followed your instruction but still can't seem to get it working. Are you able to access my process to find out what I have done wrong?

The custom table I am trying to update is : Unit of Measure - Sell - Auto Upload

thanks

Steve

Shobhit Tripathi

unread,
Jul 2, 2014, 11:12:42 PM7/2/14
to suppor...@runmyprocess.com
Hi Steve,
Could you let us know about your error?
Please send the screenshot, where you are getting error and also field variables you are using inside the process activity.

Thanks & Regards
Shobhit Tripathi



--
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/df36e038-8e4f-4e90-9c2a-93ffb85fca95%40runmyprocess.com.

master...@gmail.com

unread,
Jul 2, 2014, 11:16:25 PM7/2/14
to suppor...@runmyprocess.com

Im not getting an error. nothing is happening when I opt to test the process.

I am expecting that the custom list in question is updated with my data in my .csv file.

Steve

Reply all
Reply to author
Forward
Message has been deleted
0 new messages