Export to CSV error

Having an issue trying to save and call data from google sheet.

This is the error I am getting.

This is my code

Any and all help will be greatly appreciated.

In Screen1.Initialize, make the end of that URL visible using the JOIN trick you used further down.
We need to check it.

Please download and post each of those event block(s)/procedures here ...
(sample video)

Do not clip them, or we can't edit them in our Blocks Editor.

Here are all the blocks in question

Also, did the join trick, didn't change anything. Still get an error

Also also, the google sheets is showing that the data went onto the sheet. Just not able to pull from the sheet.

I am guessing that the way you are using this block isn't helping:

image

Use the separate and specific .GotText event blocks for each web component, otherwise this way it will try to handle all returns....

1 Like

Dang, can't believe I missed that

That's why we need an anonymous procedure as callback for the function. No mess up if there are many same functions.
the anonymous procedure has been implemented for years by Colintree, by don't know why MIT refuse to merge it.

Care to expand on this, provide links or examples ?

Do you mean the event caller:

https://community.thunkable.com/t/eventcaller-in-test-by-colintree/8975?u=taifun

Well, I thought that fixed it, but the error message was just hidden behind my web browser. So, the issue is still there somewhere

Check your forWriting.gotText blocks, you do not set a url there, which means you will be calling the forReading url with the form parameters in it. Should the url be the same as the one in Screen1.initialise ?

the forWriting.gotText block is suppose to call the same url, as the url should be updated after the button is clicked, and then it'll refresh the list view on app. The sheet is getting the data, so the url's and buttons are working just fine, it just wont export it to csv for ai to pull data from.

OK, sorry, of course you are using two different web components :upside_down_face:

Can you show your responseContent ? (paste here as text)

I'm confused, what do you mean?

I am assuming you are running your project in companion?
Set a textbox (you can then copy the output) to:

image

and report back the output here. There is something odd about the data that is being returned.

Alternatively, show a screenshot of your google sheet data, that may shed some light.

I mean this:

I'm not running it in companion... I just build it on the site and then use the emulator.

Here are screen shots of the raw sheet and also the form that the app fills out.

Also, here's the video I watched to come up with this code

Now show the full url you are using to call the data from the sheet - forReading url (you can remove some characters from the sheet ID if you want).