Need to provide export functionality in plugins

Hi,
We already have plugins designed which is showing the table data in UI, need to provide a feature to export that table data into CSV file.
Any leads will be appreciated.

Thanks in advance

Hi @kumark41 - it should be possible to create another UI element for a ‘download report’ (or whatever you want to call it) - that will generate the CSV from the data in the appropriate table. This would generally look like:

  1. UI element (button) that results in a call to a custom REST endpoint defined by your plugin (as a restResource)
  2. The REST endpoint will contain logic to retrieve data from backend and return to frontend
  3. Javascript that can then take that returned data, build the correct CSV format and .download

Apologies, I don’t have a working example of this - the first 2 steps are plugin specific - the last step should have many examples out there on the web that will help out.