Can I filter the Attachments macro by partial file name e.g. Fred*.PDF

Rodney Hughes
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.
October 21, 2016

This question is in reference to Atlassian Documentation: Attachments Macro

Suppose i have a set of 50 attachments with two types of file name structures:

Fred1.PDF   Fred2.PDF   Fred3.PDF .... Fred20.PDF

Mary1.PDF  Mary2.PDF   Mary3.PDF .... Mary30.PDF

Can I embed two versions of the Attachments macro (perhaps each in an Expand macro) and have them "filter" what is in the list e.g.  one for files as Fred*  and another for Mary*

I don't want to have to go through the list and add Labels to each file .. somewhat tedious!  sad

Note also this (as yet unanswered) question about the downloading selction from that filtered list
https://answers.atlassian.com/questions/43095217

3 answers

1 accepted

0 votes
Answer accepted
Milo Test
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.
October 21, 2016

Yes, you can use regex to filter what's shown in the Attachments macro.

Fred.*

Might do the trick.

 

And yes, you can have multiple Attachments macros on a page, each with its own regex-controlled list.

Rodney Hughes
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.
October 21, 2016

AHA!!

Setting the macro file name filter as    Mary*.*   works

Mary*.PDF does not work

Rodney Hughes
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.
October 21, 2016

still, it is a little disappointing that the filter doesn't apply to the Download All as per that other question I linked to

Milo Test
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.
October 21, 2016

When I've had to have a specific collection in a download, I've created it myself, attached the .ZIP, created a hyperlink to download that .ZIP, and set the Attachments macro to NOT show the Download all button.

0 votes
Andrey Khaneev _StiltSoft_
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.
May 24, 2017

You can filter Attachments macro or Space Attachments macro with Table Filter macro: add free text filter for name (file) column and type in Fred.*PDF.

dan brown June 30, 2020

Andrey, can you supply and example?

Andrey Khaneev _StiltSoft_
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.
June 30, 2020

Please, take a look at these screenshots:

2020-06-30_23h51_18.png2020-06-30_23h51_10.png

Like dan brown likes this
0 votes
Joseph H Sadove May 24, 2017

Very misleading description of what the Attachment macro does. It doesn't filter on anything but file extension. You cannot, for instance, as far as I can tell, search on all file with "Biz" in the name. Eg., FirstBizPlan, SecondBizPlan, etc.
Very dodgy or sloppy of Atlassian.

Benn Ingersoll September 26, 2019

Have you tried *Biz*.*?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events