Conditional formatting of a SQL-Query result set (whole rows)

Andrei [errno] Community Champion Aug 01, 2013

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

This widget could not be displayed.

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

Andrei [errno] Community Champion Aug 04, 2013

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.

This widget could not be displayed.

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 Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

486 views 3 18
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