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 of a SQL-Query result set (whole rows)

re: sql-query macro

I am able to conditionally format individual cells in a table by updating a query to incluide smth like:

, CASE
    WHEN abc = 1 THEN '<span style="background: #9e9; border: 1px solid #999;padding: 1px 12px;">one</span>' 
    WHEN abc = 0 THEN '<span style="background: #e99; border: 1px solid #999;padding: 1px 12px;">zero</span>'
    ELSE '--'
END AS ABC

+ I set query output format as "html"

but would like to conditionally format the entire row = color it red, please :)
anyone has any ideas? Bob? :)

just thinking outloud... maybe storing a tr class in the last column and not display it?

2 answers

Look at the css and related parameters like columnAttributes and rowStyles. See Common parameters - they are shared by the SQL macros.

thanks for your response. not sure how to apply this for condiitonal formatting though. I get the idea of applying a background for all rows or adding repeating patterns, but what if I need to color one particular row red if one of the fields triggers this condition? for example - this might be row number 14 out of 100.

Hello!

For conditional formatting in Confluence you may use CelesteCS Conditions for Confluence.

Thanks!

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 Apr 03, 2019 in Marketplace Apps

How to estimate projects more accurately?

Gaining insight into your team’s effectiveness and choosing the right estimation technique.   Estimating projects is hard. It is because people have the tendency to underestimate the time thin...

318 views 2 11
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you