It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Conditional formatting in confluence

Jason Skrzypek Jul 19, 2011

Hi Guys,

I have a table which produces a scores based on information entered into a scaffold form. Is it possible to change the cell or text colour based on the score value? For example is the score is below 40% this would turn red, 41%-60% this would turn orange and 61%+ would turn green. Ive started messing with Jquery which i know nothing about and probably heading in the wrong direction. I know the option is available in Excel (conditional formating) and was hoping someone would know how to do this with Confluence



2 answers

1 accepted

0 votes
Answer accepted
Kevin Buchs Jul 20, 2011

Well, here a beginning of something you might try: put your scores on other pages, and make the text on each page be set to a color based on a label. The {include} all those pages into one master table.

other pages, for example Page a, Page b and Page c contain:

My number is {show-if:label=small}{color:blue}24{color}{show-if}{show-if:label=medium}{color:green}24{color}{show-if}{show-if:label=large}{color:red}24{color}{show-if}

Where the number of interest is 24 or others. Change the colors to match your requirements. Then label each page with one of "small", "medium", "large". The roll-up page can look like this:

|| Values ||
| {include:Page a} |
| {include:Page b} |
| {include:Page c} |

This will render a table with three colored numbers in it.

I tried to think of how I could combine this with the reporting plug in, but it spits out all the {show-if} macros.

0 votes
Jason Skrzypek Jul 20, 2011

based on this link, ive created a text box where you can enter 1,2, or 3. The the report block produces text and a background colour based on the content. I just need to get this to work with the eval-data macro










{report-empty}Nothing is selected.{report-empty}


Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

2,323 views 11 27
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