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

Andrei [errno]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 1, 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

0 votes
CelesteCS April 12, 2018

Hello!

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

Thanks!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2018
0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 2, 2013

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

Andrei [errno]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events