Hitachi Vantara Pentaho Community Forums
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Formatting/Color-coding based on the value in a cell

  1. #11
    Join Date
    Jun 2004
    Posts
    5

    Default

    Hi,

    I have a table listing different string values, and I want to set the colors of the values based on an algorithm in my code.

    I can provide the colorstring for each value with the dataset, or maybe someone has other suggestions?

    How can I use this to set the colors of the stringvalues?

    Thanks.

    John

  2. #12
    Join Date
    Mar 2003
    Posts
    4,947

    Default Trying almost the same

    Hi there!!

    I'm trying to to almost the same thing....but instead of change colours I'd like to switch the visibility of the botton line of a given cell.
    In my case, I want to make invisible the botton lines of the cells (of a column) when the value of the cell is empty.
    Could help me, please?

    Thank you very much,

    []'s

    Rafael

  3. #13
    Join Date
    Oct 2004
    Posts
    14

    Default

    Why is the getValue() method in the CompareExpression class never being called ?

  4. #14
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Hi,

    expressions will only be called, if they are referenced either in an other expression or a field.

    Whenever the ElementColor function tries to read the value from the assigned field, the expression's "getValue()" method will be called and the result of that will be returned to the caller.

    Have mo' fun,
    said Thomas

  5. #15
    Join Date
    Sep 2014
    Posts
    8

    Default

    Hi , I am on same page .
    Did u got , how to do it?

  6. #16
    Join Date
    Aug 2016
    Posts
    142

    Default

    Probably don't need to resurrect an ancient thread but it is very simple to do this

    Select your cell and in Style go to the text-colour option. Click the plus symbol

    Paste something like this in where field is the name of the field you want to colour

    =IF([field]<1;"red";"green")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.