Export Collection Item
This event allows you to create an automatic workflow to download data of any collection in a CSV file.
You can also import data to your web app database from your device.
How to Export a CSV file?
First, we will create an Export Data Item event and then, bind that event to a form.
1. Go to Events
Go to the events panel and click the Add Event button. You will be redirected to the Add Events page.
2. Name the Event
Name the event as you prefer and click the Create Event button. You will be redirected to the Events Action page.
3. Select Export Collection Item
Click the add icon and take the cursor to the Import/Export Collection Data option in the drop-down list. Then select the Export Collection Item event action.
4. Select a Collection
Select a collection from which you want to send or export the data from.
5. Select the Filter (Optional)
Select All Items as the filter.
6. Add Success & Error Messages
Add a message to indicate that data is exported successfully or it has failed. Once done click the Save button to finish.
7. Drop a Button
Open the components panel and go to the "Forms" category. Drag and drop the button component in a page.
8. Bind the Export Collection Item Event
After adding a button, click to open it's Settings. Change the default name, change the type from Submit to Button and bind the Export Collection Item event to it.
9. Preview & Publish
Open the page in the preview or publish mode. As you click the button a CSV file will get downloaded.
The downloaded file will look as shown below.