Can I change the way my text is displaying via google sheets?

Hi there. So I created a google sheet and linked it to my app to allow updated information. However, I don't like the format the text comes in. I used backslash(\n) to keep each the timestamp, name and rating on an individual line but it didn't work. And the list item is enclosed in a bracket.

How do I solve this, please?

Please show your relevant blocks and a screenshot of your data on google sheets

You probably want to do something like this:

image

Screenshot (124)


These are the screenshots. You'll also notice I boldened the text and italicized it but that didn't reflect on my companion

Hmmm, do those indexes refer to the columns in the spreadsheet for example or the content of single row? I mean column as e.g timestamp, name, rating or 11/05/21, Ella, 1

I also want to add, that the list was an empty one that increases in content as the user responds. So it's not like it's prefilled.

When you call back data from a google sheet (table) like the one you show, you get a list of lists (csv table). In my blocks I am iterating over each row in the tables, and assigning each item in that row. It should make your listview look like this:

date
name
rating
--------
date
name
rating
--------
date
name
rating
--------
and so on

You didn't show your web1.GotText block.....

You will need to add a test for list content before iterating over the list. The listview will not display if there is no content

Yes I did that. But that was in the form link.

Ohhh sorry. It was the secodn one i added. This is the screenshot of web1

So I tried it and it worked. The only issue is that the new list that I set the listview element to, overrides the entire list. So the first row that's supposed to be removed remains there. I don't know if that makes sense.

Ah, you are only removing an item from the list in the app, it still remains on the google sheet, therefore when you update the data from google you start all over again!

If you need to delete items from your google sheet then you will need to use a google apps script web app. Alternatively, you could save your deleted items to a tinydb, then remove all of them from the latest data (not easy or recommended).

Ohh thank you for this info! I think I'll try that tinydb. Hopefully there's a tutorial somewhere. Thanks for your help!

Blocks should be something like this:

When you delete an item from your main list (not reversed) add the same item to your tinydb list

image

When you call back the list from google sheets, exclude all the items stored in your tinydb deleted list

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.