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
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,360 views 0 8
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