Single click document generation and download

Hi Experts,

Is there any way to generate and download an Excel file in a single click.

Thanks,

Gaurav Singh

  Discussion posts and replies are publicly visible

Parents
  • All supported methods I know of at this point will require 2 clicks - one to initialize the document generation and (automatically) display a link, then a second click by the user to actually download.  There was an older plug-in that would create an excel from a datasubset and instantly try to download, but it was really finnicky and as far as I've heard, it no longer works in modern versions of Appian.

  • HI Mike,

    As of now i have implemented the same, but somewhere I have read of using WebApi's to generate and download the document.

    Problem with Web Api is for executing Smart services it must execute a POST method and i need to use the GET method to get the document generated.

    Thanks,

    Gaurav Singh

  • You can use a Web API to generate a CSV file and it can use a GET instead of a POST. Just create a Web API, use the CSV template, and make sure you separate all your fields with a common (it's usually easiest to use the joinarray() function to do that).

    Then, call your Web API in a safelink and you should be good to go.

    The other thing to consider if you truly need it to be one click is to pre-generate your document. If the data doesn't change that frequently or if you're okay with it not being completely current, you could run a process that runs on a schedule and generates the document for you. Then, in your UI just reference the document in a document download link.

Reply
  • You can use a Web API to generate a CSV file and it can use a GET instead of a POST. Just create a Web API, use the CSV template, and make sure you separate all your fields with a common (it's usually easiest to use the joinarray() function to do that).

    Then, call your Web API in a safelink and you should be good to go.

    The other thing to consider if you truly need it to be one click is to pre-generate your document. If the data doesn't change that frequently or if you're okay with it not being completely current, you could run a process that runs on a schedule and generates the document for you. Then, in your UI just reference the document in a document download link.

Children