We want user to download files that are present in ECM system with a single click from Appian user interface.
We don't want to download and keep files on Appian server till user explicitly click on link to download file. How can we achieve file download (REST API call) and document link together on single button click?
Discussion posts and replies are publicly visible
Hi Mike
Thanks for your response.
We're looking at the details to explore that option of preload into Appian, but we will have some 2 clicks required - which is not ideal.
Regards
Your scenario is a 2-step process so inherently it will require 2 clicks. Unless you can shorten the process to 1 logical step, the best you're going to be able to do is 2 clicks, IMHO.
Hi Team,
Can we able to download the document from ECM in one click in the Appian 22.1 version OR is it still same limitation.
Thanks!!
yes
yes you are very correct
AFAIK there have been no recent changes that would add any new capabilities with respect to the number of clicks required to do this sort of thing.
We have a requirement to allow all users to download a particular document, but whenever they download, the document name should be appended with a dynamic text. Currently we are using copy document node to achieve this. Is there any other way to set a different external file name while using download document link functionality?
Use the a!documentDownloadLink field. The following code will be useful for you.
a!linkField( links: a!documentDownloadLink( label: "Download Health certificate Part II", document: todocument( rule!ASM_QE_GetAnimalHealthReports( animalId: ri!animalId, mediaCategoryId: 193, mediaNote: "Animal Health Report part II" ) ) ), showWhen: a!isNotNullOrEmpty( rule!ASM_QE_GetAnimalHealthReports( animalId: ri!animalId, mediaCategoryId: 193, mediaNote: "Animal Health Report part II" ) ) )
We have a smart service for that to update the document properties.
https://docs.appian.com/suite/help/21.1/Edit_Document_Properties_Smart_Service.html
Thenmozhi Mohanakrishnan said:Is there any other way to set a different external file name while using download document link functionality?
Nope. Such behavior will 100% require 2 clicks by the user, at least.
The implementation you describe is pretty much already what I'd suggest anyway - copy the document to a temporary copy with a new name, and expose that as the document download link. The user would need to click once to initiate the initial copy/rename, then after that's done, they can click again to download the document.
To confirm, the Document Download Link component does not have any way of doing anything "before" the download - literally all it does is provide a direct download link.