I am showing few fields from the DSE in a grid and i set a advanced search to filter from the result shown in the grid , now after i set the filter i have to click on the export to excel and it should generate the excel document . the export should have only the fields that i show in the grid and not all the DSE, i have the filtered result to pass , but the function we have support only to export from DSE and not the custom. i tried with PM . but it get stored in Appian folder which does not suffice . can any one suggest how we can export the custom grid with the filtered list as export to excel or csv . Thanks
Discussion posts and replies are publicly visible
Apply the same filter object used by the grid to the export smart service’s Filters input, and use Selection to list only the columns shown in the grid. Export matches the filtered grid.
premanandr318432 said:i tried with PM . but it get stored in Appian folder which does not suffice
Almost all sufficient solutions will require something like this, though. It's very easy to handle - simply generate the document in a PM and pass the generated document ID back into your interface, after which you show your user a friendly Document Download link in a Rich Text Display Field.
I recommend you look into the JSON to Excel plug-in, it's flexible and allows the use of an Excel Base Template (if desired, though it's optional), and the nice thing is you can pass in arbitrary JSON dictionary data with no specialized CDTs or anything else needed at generate time. This would allow you to, for instance, fashion a custom JSON string in your interface containing the exact columns(s) and row(s) of data you want, in the exact formatting you want, then pass it into a small helper process model to generate the excel, and not need to worry about doing any additional filtering (etc).
Thanks Mike , Will it not be a 2 click process where one trigger to export and then to download , also the form is not part of the process
Thanks Shubam , Ya but that filtered data is not from database its in UI now, we have made the DB call, got the data and then we store it in filtered list . now its in Memory .i don't think we can pass the filtered list to function to work . correct me if i am wrong .
You can try to, Store the filter values in a pv!, then rebuild them in the format required by the smart service, like a list of a!queryFilter() or a!querySelection(), and pass that to Filters.
premanandr318432 said:Will it not be a 2 click process where one trigger to export and then to download
Yes, but I don't know of any supported solution that won't be 2 clicks. I've heard some people say that you can structure it as a link that invokes a Web API call, where the Web API launches a process and ends up generating a document that the user ends up downloading, but I have not personally recreated that setup, nor have I seen anyone present a fully-developed example, so I can't speak to how feasible it is.
premanandr318432 said:also the form is not part of the process
I'm not entirelly sure what you mean by this. In the example I described above, the interface the user interacts with can be anywhere (site page, etc), and it merely calls (via button click, etc) the process that generates the document, and pulls back the generated document ID from the process properties.