FAQ Document list

I've a requirement to make available a number of PDF documents within our UI, that the users can download as and when they wish.
Initially I sorted this by saving those docs in Appian KC, along with an associated DB table that stores amongst other things the docID.

At run time I simply make a call to the db table, get the doc id's and then generate the list using a!documentlnk.

a!richTextDisplayField(
value:{
a!richTextIcon(icon:"newspaper-o",
color:if(fv!item.priority="1","NEGATIVE",{})
),
a!richTextItem( text:" "&todate(fv!item.updatedon)&" "&fv!item.message,
link:if(toboolean(fv!item.islink)=true(),
{
a!documentDownloadLink(
label:"download",document:fv!item.doc)
}

Works great.
However I want to expand this to capture which of the docs are being downloaded and are true FAQ's vs ones that simple dont need to be taking space. Ideally I thought to use an a!saveinto and write the pertinent into to another db table. However can't see how I'd do that and there's no support in the above functions for doing so. If I replaced the above with an array of buttons, then I lose the download function. 

Any ideas ?

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    The logfile /audit/file_attachment_downloads has the information you need.

  • A couple of ideas:

    1. there is a log made of which documents have been downloaded, by who and when (file_attachment_downloads.csv). There is a log reader plug-in that allows you to get at this information. You'd' have to filter out all of the documents that you're not interested in, and manipulate the data to get the statistics you want
    2. You could have the download in a dialog (i.e. a Record Action) and use the process model to write the download count to the same database that you hold the metadata in. The numbers won't be a reliable as you'd be assuming that the user had downloaded the document when they entered into the dialog, but it's highly likely they won't have entered the dialog unless they were intending to download the associated document.