google spreadsheet integration using array

314 views
Skip to first unread message

fast...@gmail.com

unread,
Feb 4, 2014, 9:00:09 PM2/4/14
to suppor...@runmyprocess.com
Hi

I followed the video on Google spreadsheet integration
http://www.youtube.com/watch?v=of2rMOoJZdw

and in this video it shows how to read the rows from the spreadsheet and place them in a list component.

What I would like to do is read the spreadsheet rows and display them in array UI component.

My example starts with copying the web interface used in the "Google spreadsheet integration" video and then I add the array component to it.

Can someone give me guidance on doing this please?

Thank you

thoshino

unread,
Feb 4, 2014, 9:24:51 PM2/4/14
to suppor...@runmyprocess.com, fast...@gmail.com
Hi,

You can implement similar Process (now it should be Composite API), attach it as API listener, and in the Completed script, use the above functions to fill in the array.

To manipulate the array and data individually, you can use the RMP Javascript functions here:

For example:
to set a value of an cell in the array widget, you can do something like, id_my_array.id_col1[0].setText("my_value")
to add row in array widget, you can do something like, id_my_array.insertRow(0);
your script must iterate through all the return values from API listener with above functions.

Another way would be to use Global methods to directly change the variable value:

Array widget's variable structure looks like: {"col1":["var1","var2","var3"]."col2":["vara","varb","varc"]}.
This should work fine if your array widget only consists of simple widgets like text.
Please see attached example.
The code there is
var my_var = {"col1":["var1","var2","var3"],"col2":["vara","varb","varc"]};
RMPApplication.set("my_array",my_var);

I hope this helps,

Best regards,

Taka

array_var.png
Reply all
Reply to author
Forward
0 new messages