Atlassian Databases: Attachments Links Display Text (or Embedded Attachments)
Asked by Sherman, Christopher R:

Hello Atlassian Community,

Here seeking some assistance with the Databases utility. Our use case is that we use Confluence as a source of truth for certain business activities and templates to be used (largely .doc, .xls, .pdf) in the completion of these activities. These templates live in multiple Confluence pages within attachments macros.

We've been exploring the use of Atlassian Databases to better manage our attachments and attributes pertaining to them. We want to use the "Link field" Database field type to link back to the attachment, and allow people to download it from the database. However, the link field is displaying the attachments full URL, instead of the desired link Display Text. And these lengthy URLs are taking up valuable visual real estate and lose context we can provide with a display name.

Has anyone found a workaround to this problem? I see the Link field does support display text when you link a Confluence page, not the case though for attachments.

An alternative approach could be embedding the attachment in the database but there is no current field type to support this, and I'm unclear what's on the roadmap for this new utility (Databases).

Thanks in advance to anyone who can provide help!


Answers:
author: Kristian Klima
body: Hi [@Sherman, Christopher R](/t5/user/viewprofilepage/user-id/5493886) and welcome to the Community

It's possible ;)

You just need to put the attachment in an excerpt macro.

Then, in Database, use page link as you main column, then page details - excerpt.

![2024-07-02_16-23-48.png](https://community.atlassian.com/t5/image/serverpage/image-id/333054i38FAA90C74AA2AC0/image-size/large?v=v2&px=999 "2024-07-02_16-23-48.png")

I wrote an [article on DB tips and tricks](https://community.atlassian.com/t5/Confluence-articles/Use-Databases-for-your-docs-life-cycle-management-updated/ba-p/2663479), you may find it useful.

comments: author: Sherman, Christopher R
body: Kristian, thank you very much for your quick response! We've been working with this solution and see that it works very well. Within the Excerpt we are able to add the link and change the link display text to what we desire. We can hide the page links and rename the page details column to something more easily understood for people using the database. We also experimented with putting the attachment in the excerpt and even an attachments macro - the results were not as desired as the attachment icon needed too much space and the attachments macro delivered a lot of contextual attachments detail in the field where we only wanted the attachment name and link.

We are continuing to face a problem though. Our use case involves having a master database where we perform all of our maintenance, and then linked databases in various confluence pages used for display and delivery purposes where we apply filters to show only the master database content that's applicable. The linked database field for the page details never displays the attachment link. It's a perpetual gray oval, as if the database is trying to make the link and display the correct content but cannot do so. This is likely a bug and we will report it.

Any other suggestions from the community to get attachment display text in **linked** databases?


author: Kristian Klima
body: [@Sherman, Christopher R](/t5/user/viewprofilepage/user-id/5493886)

Like this?

I'm using the Embed Database macro and it displayes the excerpt just fine but... I'm not sure if that's exactly what you had in mind.

![2024-07-08_09-13-47.png](https://community.atlassian.com/t5/image/serverpage/image-id/333924i0465FD2E11CA1AFE/image-size/large?v=v2&px=999 "2024-07-08_09-13-47.png")


author: Debicka_ Katie
body: Hi [@Kristian Klima](/t5/user/viewprofilepage/user-id/5074962) - let me try to explain on behalf of Chris who is enjoying his well deserved vacation :) and thank you for your insight and ideas so far!

So, we got one master database, where the links to the attachments stored in excerpts - page details field - are showing fine. But we also got a child database, where we use entry link field (item name) to pull entry details from the master database. And all entry details columns are pulling details from master fine (tags, descriptions, etc), except for the excerpt attachment column, where this perpetual gray "loading" oval comes up where the links should be. I'm wondering, is the database design unable to handle "page details" column being used as "entry details" further down the line.

![Excerptlink.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/333936i48FDB4EB0C83B2F1/image-size/large?v=v2&px=999 "Excerptlink.PNG")


author: Kristian Klima
body: [@Debicka_ Katie](/t5/user/viewprofilepage/user-id/5534344)

That's, I'm afraid, something I have no experience with.

What I can think of are permissions - along the lines of 'one database belongs to a space A, another databases is in space B, and the two spaces are governed by different permissions / page restrictions. This is purely a speculation but maybe it inspires you :)


author: Debicka_ Katie
body: No unfortunately that's not it, they're all within the same space. No worries, I'll keep playing with it, if I find a solution or answer I'll definitely share it here :)


author: Sherman, Christopher R
body: Our solution will be to create many views within our master database, in how we would want to filter content on other pages, embed the master in those other pages, apply and lock the views. The original plan for creating separate databases and linking the fields to the master does not work - we get the defect where the embedded link wont display. But the new solution is probably less effort long run!

[@Kristian Klima](/t5/user/viewprofilepage/user-id/5074962) we would love to review your database tips and tricks but we get an "invalid parameters" error on the link you shared. Thanks again for helping us with this challenge!


author: Kristian Klima
body: [@Sherman, Christopher R](/t5/user/viewprofilepage/user-id/5493886)

This is weird... the link looked exactly the same as the one I just replaced it with.

<https://community.atlassian.com/t5/Confluence-articles/Use-Databases-for-your-docs-life-cycle-management-updated/ba-p/2663479>


author: Sherman, Christopher R
body: Great! That link works!!!


author: Nour Karaki
body: Hi [@Kristian Klima](/t5/user/viewprofilepage/user-id/5074962) ,

I'm interested in the same topic and was wondering if it's possible to select one of the excerpts on a page that contains many.

I have a database and need to add an attachment to each entry, so I created a confluence page with all the attachments in separate excerpts; do I need to make a page for each attachment to link to the correct excerpt, or is there a workaround for this?


author: Kristian Klima
body: Hi [@Nour Karaki](/t5/user/viewprofilepage/user-id/5527605)

Many companies are using multiple excerpts on a single page to create a repository of the images that are used across multiple pages.

Say you have Page A with excerpts 1 to 10.

On Page B, you can select to display excerpt 1.

On Page C, you can select to display excerpts 1 and 5. You get the idea.

I suggest that you experiment with the setup and see what works best for you.


Tags: attachments

cloud

confluence-cloud

database

links