override download file

When I upload more than one files and then going to download thes files .only first file is downloading not all files are downloading.

what sould I do so that all uploading files are able to downloaded.................

code:---

a!localVariables(

local!docData:rule!PM_getAttachmentDetailsByReqId(ri!requestId),
local!docId:index(local!docData,"docId",null),
local!attach:index(local!docData,"attachmentId",null),
a!gridField(
labelPosition: "COLLAPSED",
emptyGridMessage: "No activity entries available",
data: local!data,
a!gridColumn(
label:"Details",
sortField:"details",
value:a!richTextDisplayField(
value:{
a!richTextItem(
text:{
a!richTextItem(
text:fv!row.details,
showWhen:if( fv!row.action=cons!PM_TASK_NAMES[3],
false,
true
)
),
a!richTextItem(text: "Download Attachement File :" ,
showWhen: fv!row.action=cons!PM_TASK_NAMES[3]),
" ",

a!richTextItem(
text: a!richTextIcon(
icon:"download"
),
link: a!documentDownloadLink(
document: local!docId
),
showWhen:fv!row.action=cons!PM_TASK_NAMES[3]
)



}
)
}
)

)
),
))

  Discussion posts and replies are publicly visible

Top Replies

Parents Reply
  • 0
    Certified Lead Developer
    in reply to shifaalam

    That code is a bit confusing ...

    I think that it should be enough to change

    a!documentDownloadLink( 
      document: local!docId
    ),

    to

    a!documentDownloadLink( 
      document: fv!row.docId
    ),

    Why! The grid iterates on the records in your list "local!docData". fv!row points to one record to define values for each grid row.

    I do not understand why you created that local!docId ?!?

Children
No Data