Export data, query limit

Hi, I’m working with your new feature: importing and exporting data.
It works really well and I’m happy to use it.
But I have two questions:

  1. On the post Velo Tutorial: Importing and Exporting Collection Data with Code | Help Center | Wix.com you are saying: “The maximum allowable limit is 1000. So if you want to export more than 1000 items from your collection, you will need to perform multiple queries.” Could you give me an example how to pull out the data if there are over 1000 records? As we are aspecting a lot of subscribers based on last events.

  2. We would like to download the data and it is nice that it can be doen by going to a third party website. But we would like to make it easy for our clients. Is there a possibility for a button download CSV? Which converts the data from JSON to CSV and immediately starts downloading the CSV?

Kind regards,

Richard

Hi Richard,

to answer your questions:

  1. You can always skip first X items to get 1000 more items. For example to get second thousand of items you could run the following query:
wixData.query("collection")
  .limit(1000)
  .skip(1000)
  .find()

It is possible to count items in collection and loop the request until all items are received.

  1. Currently, it is not possible with just Wix Code. But we are working on a feature that will enable such use cases. Follow our Product Updates for announcement.

Let me know if you need further assistance.

Thanks, that sure helps me a bit, especially for the first part!

But beside from the Wix code, isn’t it possible to combine it with Javascript what does the job?
Tried already some things but not all elements where approved by Wix, for example $document and document.body.appendChild(link); are giving me errors. The code is coming from the following JS Fiddle which is quite easy code. Is it possible to combine it with the Wix code? I really want to have the job done.

Thanks,

In Wix Code elements like document or window are not exposed. You get a higher level of abstraction to interact with elements in the page.

The reference of the things available can be found here: