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
  • instead of fn!document , use expression rule to get document name.
    like below...
    a!gridTextColumn(
    label: "Document Name",
                                            data:apply(rule!Test_getdocumentname(_),local!docdetails.data.iAttachmentId),
    links: apply(a!documentDownloadLink(_,""),local!docdetails.data.iAttachmentId),
    alignment: "LEFT"
    ),

    rule!Test_getdocumentname:ri!docID

    if(isnull(ri!docID),"",document(ri!docID,"name"))
Reply
  • instead of fn!document , use expression rule to get document name.
    like below...
    a!gridTextColumn(
    label: "Document Name",
                                            data:apply(rule!Test_getdocumentname(_),local!docdetails.data.iAttachmentId),
    links: apply(a!documentDownloadLink(_,""),local!docdetails.data.iAttachmentId),
    alignment: "LEFT"
    ),

    rule!Test_getdocumentname:ri!docID

    if(isnull(ri!docID),"",document(ri!docID,"name"))
Children
No Data