Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Active filtering of attachments

Agnes Kelemen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 6, 2020

Hi,

I am trying setup a page with different attachment types (Word, PDF, video files, etc.) and would like to have the option to search the entire page based on keywords/labels linked to the files.

I have tried to add labels to the files and then use the Attachment, Attachment space macro to try and see if i can have an active filtering based on the labels, but so far it is not working. Not sure what I am doing wrong. :(

As an example of what I am trying to achieve:

Overview page:

File 1 (label: red)

File 2 (label: red, blue)

File 3 (label: green)

Show a filter box on the page and when I type "red", I should only see File 1 and File 2, because they contain the labels/keywords. the rest should be actively filtered out.

Any help would be appreciated!

Thanks,

Agnes

 

1 answer

0 votes
Ravya
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2020

Hi @Agnes Kelemen ,

You can filter the page attachments using the attachment macro:
2020-07-06_21-49-39.png

If you have any file pattern you can use extensions like .*pdf or so on.

Or else you can use Bobswift's Advanced Tables app - Attachment macro as well, to filter out using labels:

2020-07-06_21-52-22.png2020-07-06_21-52-14.png

 

Hope the information helps.

--Ravya

Agnes Kelemen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 7, 2020

Hi @Ravya 

Thanks for your reply.

I have tested these macros and from what I've seen these are pre-filtering the attachments, rather than allowing the user to actively search based on labels and then filter the documents out.

The goal is to give the end user  the option to search for the attachments on their own, rather than me creating a filter based on certain labels and showing the attachments already grouped. We are trying to create a document repository, but we need to keep the search open to everyone, so we don't restrict what they see from the beginning. we need users to be able to find all attachments that have a certain label, when they are searching. Not sure, if this is possible in Confluence or not.

Thanks,

Agnes

Ravya
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2020

Hi @Agnes Kelemen ,

Yes, you can achieve this using Bobswift's Run Self-Service Reports for Confluence app along with Advanced Tables for Confluence app.

  • Insert the Bobswift's Attachment macro in the confluence and set page filtering as per your requirement.
    2020-07-14_10-30-56.png
    And in the Attachmnet filtering section for Attachment label regex add $LABEL
    2020-07-14_10-32-02.png
  • Insert a RUN WITH A USER FORM AND PARAMETERS macro which comes from Run Self-Service Reports for Confluence app. And edit the macro and add field though the option available.
    Delete the field Group which is not useful for you in this case. And in the Field Type add Text and for Field Key add LABEL:
    2020-07-14_10-39-10.png
  • Now insert the attachment macro inside the RUN macro:
    2020-07-14_10-41-49.png
  • Now once you publish the page, you can see the option to insert the label name and once you click run, it will list out the attachments with specified labels:
    2020-07-14_10-43-46.png

Hope it helps!

--Ravya

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events