How to display multiple files with document link in a single column

Hi,

I have a grid style interface based on process backed record. One of the column(Documents) has multiple files. See the screenshot below:

I'm trying to display download link for the docs listed. I am getting error "Could not display interface. Please check definition and inputs.
Interface Definition: Expression evaluation error at function a!forEach [line 358]: Error in a!forEach() expression during iteration 1: Expression evaluation error at function 'document' [line 361]: The passed parameter(s) are of the wrong type. Received the type List of Document."

Here is the code:

a!gridTextColumn(
            label: "Documents",
            field: "documentAttachmentArray",
            data: if(local!datasubset.totalCount=0,{},a!forEach(items: local!datasubset.data,
                  expression: joinarray(index(fv!item, "documentAttachmentArray", {}),"; "))),
            links: a!forEach(
                   items: local!datasubset.data,
                   expression: joinarray(a!documentDownloadLink(
                              label: document(index(fv!item, "documentAttachmentArray", {}),"name"),
                              document: index(fv!item, "documentAttachmentArray", {})
                ),"; ")
                   )
          )

Any help is appreciated.

Thanks,

Meena

  Discussion posts and replies are publicly visible