Error: "Invalid function document"

I am getting the below error message:
Expression evaluation error in rule 'cmedgetdocumentname' at function 'document': Error evaluating function 'document' : Expression evaluation error : Invalid function document

the sample code:
a!gridTextColumn(
label: "Document Name",
                                        data:apply(fn!document(_"name),local!docdetails.data.iAttachmentId),
links: apply(a!documentDownloadLink(_,""),local!docdetails.data.iAttachmentId),
alignment: "LEFT"
),

Any suggestion?

OriginalPostID-190260

OriginalPostID-190260

  Discussion posts and replies are publicly visible

Parents
  • This issue might occur if the document is not present in the Appian repository and you are trying to get the name of such document.
    Also, please check how you are storing the document id in process variable/DB properly.
    As, you are using naming convention as Attachment id, is this the document id OR attachment id? (Appian attachment is generated as an output of Add Attachment smart service and which is altogether different from the document id).
Reply
  • This issue might occur if the document is not present in the Appian repository and you are trying to get the name of such document.
    Also, please check how you are storing the document id in process variable/DB properly.
    As, you are using naming convention as Attachment id, is this the document id OR attachment id? (Appian attachment is generated as an output of Add Attachment smart service and which is altogether different from the document id).
Children
No Data