Skip to main content
September 15, 2021
Question

Download document and save the metadata

  • September 15, 2021
  • 2 replies
  • 0 views

Hi All,

          My requirement is when I click on the download document link. I also need store some meta data in DB.

Metadata like who downloaded the document, time, document name, process variables etc. On click of the document download link two action should to be performed. 

1) Document should be downloaded.

2) Data should persisted in DB.

What should be my design approach.       

2 replies

stefanhelzle0001
Brainy
September 15, 2021

A document download link can not do this currently. You might need to do a two-step UI with a button you click to make the download link show up.

sais0002Author
September 15, 2021

Found answer in this thread

https://community.appian.com/discussions/f/user-interface/13198/on-single-click-download-the-document-and-write-record-in-db

Others may benefit

load(
local!isShowDocument:false(),
{
a!linkField(
label: "",
labelPosition: "ABOVE",
links: {
a!dynamicLink(
label:"Show Document",
value:true(),
saveInto: {
local!isShowDocument,
/*We can perform the Write Operation here*/
/* a!writeToDataStoreEntity(

)*/
},
showWhen:not(local!isShowDocument)
),
a!documentDownloadLink(
label:"Download Document",
document:todocument(12345),
showWhen:local!isShowDocument
)
}
)
}
)