Help to store the colintree list in gsheet & retrive back

Hello Kodular Community,

I have a list of data that I successfully displayed in ColinTreeListView, as shown in the block below:

Now, I want to store this list in a single cell of a Google Spreadsheet in a format that allows me to retrieve it later and set it back in ColinTreeListView exactly as before.

:small_blue_diamond:How can I store the list properly in Google Sheets?
:small_blue_diamond:How do I retrieve the stored data and convert it back into a list for ColinTreeListView?

go here, copy the apps script, go to google sheet, create a nrw sheet, go to apps script, paste all the code, deploy with permission can be accessed by everyone, copy the url

Add a button

When this button clicked

Set web url to script url, add sheet id, sheet name, set FN as appendRow, set DATA to abive prepared final list and send GET request.

Automatically your list will be saved

Add one more button
When click this button call your gsheet url as csv and then pass into collintree

Simple

Code credit to @TimAi2


according to the above block when i set this to the colintree list view its successful loaded but i tried a lot to store it in muntiple ways but i didn’t get a solution to store and again whenever i call back it shall be loaded on colintree list view , for better understanding i tried to get the value from the above block in which the list is getting display successful and the value of the get list variable was - ((image.png 102-DORITOS X 100-50 ₹800 , DISCOUNT ₹19200) (product.jpg 102-NILONS X 200-5 ₹202.5 , DISCOUNT ₹100797.5)) and when i tried to store and again set the value to the colintree list view i got this error The operation Set cannot accept the arguments: , [((image.png 102-DORITOS X 100-50 ₹800 , DISCOUNT ₹19200) (product.jpg 102-NILONS X 200-5 ₹202.5 , DISCOUNT ₹100797.5))]
Note: You will not see another error reported for 5 seconds.


I am already using the extention of Spreadsheets to store and get the data from the spreadsheet. my issues is when i try to store the data of the the colintree list view and call it back and again try to set and load it on colintree list view i get an error!! so i need a help to store the data in such a formate that whenever i call the data it shall be getting easily loaded in colintree list view

Once you get the date from the sheet did you try to save the whole value into the collintree? Dis you try? Can you show me how did you try from the gsheet?

In the given below block , i have stored the colintreelistview to a vairable -


and now in the given below block i have stored the variable in a gsheet cell

In the attached block, I retrieve the stored data and set the stored cell data to the ColinTree ListView.

However, when I check the stored data in gsheet , I see the following values:

(
(image1.jpg 101-LAYS ₹5 X 45-2 ₹55, DISCOUNT ₹44629),
(image2.png 102-NILONS X 15-25 ₹55, DISCOUNT ₹12445)
)

But when I try to set this data to the ColinTree ListView, I encounter the following error:

The operation ‘Set’ cannot accept the arguments:
[
(
(image1.jpg 101-LAYS ₹5 X 45-2 ₹55, DISCOUNT ₹44629),
(image2.png 102-NILONS X 15-25 ₹55, DISCOUNT ₹12445)
)
]

Both are mismatching. In first case you are adding list of datas to Colin but in second you ate adding as string and nit a list. Make sure what you are getting back grom the gsheet, a string if datas or list of datas. Collintree will accept inly the list and not a string

May be try this block in front of the list
Set collintree list to List from csv table text get global list

by the block according to you something happened the list got loaded without any error but it is wired only the string data is showing and only 1 row generated

Yes as per the above method you can see only the players name according to the selected team. You requested that thing only know? Or you want both?

Column 1 Column 2
Game 1 Rose
Game 2 Pink
Game 2 Yellow
Game 1 Nanci
Game 2 Jammu
Game 1 Ammu

I got these data as a csv table text in to the global list.

And when i select Game 1, i got result as

  1. Rose
  2. Nanci
  3. Ammu

If i select Game 2 then i got result as

  1. Pink
  2. Yellow
  3. Jammu

And populate them into the listview, if i am correct, i hope, these details only you’ve requested.

Hello dear @Still-learning its my request to help me out

But the video is totally different than your original query, pls check the video.

And if you find the code is nit working to you pls send us your sample aia

Your method is wont work, you are pushing all the collintree data inside a cell and want to paste into the same collintree list, that is impossible. so i save the data into different cells, then recovered all. But this extension will not save the data orderly, it iwll save in random order only, so there will be difference in the order of new list obtained from the gsheet but it will work. I never use extension to deal with gsheet, Because i am good with handling gsheet and app inventor via script url. anyhow i adjusted slighlty your aia and check it.

COLINTREE_LIST.aia (96.0 KB)

So, what’s the solution dear ?

is there any other way like airtable …etc

where i can store this data and recall it to set back to colintree list view.

see my main motive is In my app, I generate invoices that contain multiple products with different values. Now, I want to store this invoice data in a way that I can later retrieve it and set it back into a ColinTree ListView so help me now you can do anything like diffrent coloum for diffrent data like product image url , product name

Don’t use Airtable until you are buying their paid plan! Google spreadsheet is the solution for you.

But my problem is to store the colintree ist view and when i need it back i can easily set it back ? is there any option could you help me please

DM your whatsapp I will hep you

A post was merged into an existing topic: Evaluate javascript is not working in custom webview, back press not working :confused: