Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,742
Community Members
 
Community Events
165
Community Groups

Is it possible for the CONTENT REPORT TABLE macro to impose an AND requirement for two labels?

Hi,

The "Label(s)" field on the the CONTENT REPORT TABLE macro allows two labels to be entered with comma separators, but treats this as an OR requirement, displaying any page having Label A and/or Label B.  I would help me greatly if I could set up this macro (or any macro) to display only pages having both Label A and Label B.  Anyone know of a way to do this?  

The closest I have come is to use the SEARCH RESULTS macro's Search Terms  field, where I add:  labelText:label-1 AND labelText:label-2.  The Content Report Tables result format is nicer, though.  

I have this same need for the LIVESEARCH macro.  It has a "Restrict to Label(s)" field that accepts multiple label names, but will only perform an OR search with them.  I need an AND search that will only display pages that have ALL the labels I list.

Any suggestions would be appreciated.  

Thanks,

Kevin Ryan

3 answers

For those like me who stumbled upon this post now in the future, Content by Label is what you're looking for. 

Alfie, 

Sorry for the delay responding. Thanks for this great advice. I did not know that Content by Label could deliver the AND label filter that I wanted.  

Kevin 

This is the closest open question to what I want to do, which is to pull content ONLY if it has all the search parameters, using two tags pulls up everything with either of the tags. 

Has anyone found an answer to this?

 

I note that this can be done using content by label but not the content report table.

The quick solution would be to combine the 2 labels into 1 label (C). Label A and B are on a page, but add C if you want it to be in your Content Report Table.

I'll look though the knowledge base as well to see if you can do a "this and that" statement in the Content Report Table, but I doubt it.

I like being proven wrong because I then learn something new.

Thanks, Jonathan.  Combining two labels into one would kind of defeat the purpose of having an AND search. I'm looking to search through only documents that are the union of documents having Label 1 and documents having Label 2 --- not to have to manually re-tag such documents with a Label 3 to achieve my end.

Kevin

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

315 views 2 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you