Stuck on Downloading CSV file

I have a recordset and a button to export to CVS. The xport works amazingly well. Love Wappler!

Screen Shot 2022-08-30 at 11.46.47 AM

What I want to do is when that button is clicked on to export and then download the file. I can’t get the download to work.

What am I doing wrong?

Hi Brad, it’s already explained in the docs how to use the download action:

In the download step path just use the csv export step as an expression, the rest is explained in the tutorial.

1 Like

That’s what I tried I think? But the download does not download. The CSV gets created but the file doesn’t download. What have I set wrong?

Have you checked the tutorial i linked to? Especially the part where it explains how to call the server action on the page?
Also in the download step just use the export step as a path, not a static path …

I tried but it uses routing? Do I have to use routing? I can’t follow that part.

Like this?

Ok, I have followed the doc step by step to add the link to the button. It won’t let me add the route.

Got it! Had to take the ‘/:sort/:dir’ off of my route. Not sure if that is the right thing to do or not.

But it seems to work.

Did I mention how much I love Wappler? :beers:

6 times so far :smiley:

https://community.wappler.io/search?q=%22I%20love%20Wappler%22%20%40brad

3 Likes

Haha!