Download CSV using button

Certified Associate Developer

i am getting data from external system which is being displayed on UI(example: 2342;34324;3441), i want to export this data by clicking on button in the form of CSV.

please suggest the right steps.

Thanks in advance.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Suresh

    OK. This is still lacking the important level of detail. I recommend to visit these websites to see how to ask a question in a way that allows the community to answer in a efficient way.

    https://stackoverflow.com/help/how-to-ask

    https://codeblog.jonskeet.uk/2012/11/24/stack-overflow-question-checklist/

    I see two options. As I have no idea how much experience you have with Appian and other things, I will try to outline both.

    You can trigger a process in the background (a!startProcess) that fetches the data based on the search, and writes that into a text file based on a simple CSV file using the smart service "Text Doc From Template". Then display a link to the user  to download that file. And no, there is no way to do this in one step only.

    Another option is, to create a GET web API that returns a CSV file. There is a template for this. Pass the search parameter to the API, fetch the data and create text output. The header configuration from the template makes the browser download the file. Use a safeLink component to create a link the user can click to get the data.

    Beware! Both options are only good for very small amounts of data and will NOT scale!

Children