conditional format in list

Confluence User - 10 Jan, 2016

Dear Help Desk Guys.

Can you please confirm me how to include a conditional format in a List column?

I just need to highlight negative numbers in red.

I've been trying with the "Configure Options Value Formatter" with no success.

Note: I'm using the cloud version.

Thanks for any tip or help.

Matias

forms;datalists;format

2


12 Jan, 2016
confluenceUser
confluenceUser

Hi,

Similar to the question Email hyperlink(mailto:) in list, you can use some JavaScript/JQuery to accomplish this. In your userview menu page header or footer, something like this would work:

$("td.column_amount").each(function() {
    var val = $(this).text();
    if (parseFloat(val) < 0) {
        $(this).html("<span style='color:red'>" + val + "</span>");
    }
});

20 Apr, 2016
confluenceUser
confluenceUser

Dear Anders, Thanks for the answer, I've tried this with no success.

Just to clarify my situation: I have a list ("listA") with an "amount" column (positive and negative numbers).  I also have a form where I've included a List Grid element whith this "ListA".

I need each user to be abble to differentiate the negative numbers in column "amount" while working in the form.

I've tried with both the "inline Style" and the "options Value formatter" with no success at all.

 

Any Help from anybody??

 

Thanks

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print