Can you write all the data in a ListView to a Google Sheet?

Good day,

I'm currently busy with a section of an app I'm creating. In this section the user can select to move goods between 4 groups, namely Group 1, Group 2, Group 3 and VGroup. So in order to do this within AI2 I am searching for the required group i.e Group 1 in Google Sheets sheet (a) using a spinner. The found data (.csv) is then returned into a ListView. Can I then have all the data in the ListView be written to a sheet (b) and not just the selected data.

Reason being, after all the data has been written to the sheet (b), I then want to replace the word "Group 1" with whatever group, e.g VGroup, has been selected in the second spinner. After the word "Group 1" has been replaced with word "VGroup", the data from sheet (b) should be written back to sheet (a) replacing the original data in sheet (a).

I'll be able to do the second part of my explanation however the part I'm stuck on is how to write all the data in the listview to the sheet.

If anyone can assist me with this or maybe just point my in the right direction it would really be greatly appreciated.

To answer your topic title, yes you can.

Please show your relevant blocks, and example data CSV of what you are inputting to the list view and what you want to send to Google sheets

If you want to replace data in a Sheet, keep the row IDs.

AI2 tables are easier to work with than display components like ListViews.

movedata.csv (995 Bytes)

Here is all you requested. The Writeblocks.png is just something I tried, which as I expected did not work.

You do not show a Web1.GET block for your queries ?

Are you getting data back from your query ? What does it look like in the listview ?

You have no method for updating the google sheet (you will need either a google form or a google apps script web app to do this)

I haven't seen any menton in this thread yet of the AI2 Google Sheets component.


Apologies for the late reply. Please see the requested blocks.

Hmmm, not quite sure what you are trying to do. From your blocks it appears you are trying to call a google apps script web app, with no data parameters (to update?), and a gviz query on google sheet data (to get data) using the same single web1.Get. I don't think this will work as you expect. What do you have in your google apps script web app?

Apologies for being so tardy with my replies.

Here is everything I've done so far regarding this matter, including a script I've been working on which sort of works doesn't yield the desired result, instead it just deletes everything from my sheet.

Move Script.txt (1.2 KB)

This needs simplifying, too many things that can go wrong at once! Also it is difficult to debug without seeing the google sheet, the full google apps script and the aia project.

Write out your workflow in steps, convert this to blocks one step at a time, testing as you go...

From what I can see, you first want to get some data from your google sheet. Start there and report back ....