Is it possible to output multiple document links with a!documentDownloadLink, wi

Is it possible to output multiple document links with a!documentDownloadLink, within a!linkField, that display on the same line? Or any other solution for document links would work as well.. Similar to how joinarray(links,", ") would separate an array into a comma delmited output on the same line. My code is below, but I can't seem to creat anything that does not display links on one line each.

a!linkField(
links:
          apply(
           a!documentDownloadLink,
           merge(
                    local!docs,
                    local!docNames
           )
          )
)

OriginalPostID-165099

OriginalPostID-165099

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    And maybe it would work to have the custom expression judge whether it needs to add a separator (skipping the separator for the last in a list), and do it as a separate component so it's not hyperlinked? disclaimer: i'm not guaranteeing the following component will work right, but this is roughly what i'm thinking of:

    {
    a!richTextItem(
    text: ri!docNames[ri!index],
    link: a!documentDownloadLink(
    ri!docs[ri!index],
    ri!docNames[ri!index]
    )
    ),
    if(
    ri!index < length(ri!docs),
    a!richTextItem(
    text: " | "
    ),
    {}
    )
    }

    Note that for this example, you'd pass in the full arrays of local!docs and local!docNames, as well as an integer array for index (e.g. enumerate(length(local!docs))+1).
Reply
  • 0
    Certified Lead Developer
    And maybe it would work to have the custom expression judge whether it needs to add a separator (skipping the separator for the last in a list), and do it as a separate component so it's not hyperlinked? disclaimer: i'm not guaranteeing the following component will work right, but this is roughly what i'm thinking of:

    {
    a!richTextItem(
    text: ri!docNames[ri!index],
    link: a!documentDownloadLink(
    ri!docs[ri!index],
    ri!docNames[ri!index]
    )
    ),
    if(
    ri!index < length(ri!docs),
    a!richTextItem(
    text: " | "
    ),
    {}
    )
    }

    Note that for this example, you'd pass in the full arrays of local!docs and local!docNames, as well as an integer array for index (e.g. enumerate(length(local!docs))+1).
Children
No Data