How to color a cell depending on boolean conditions ?

johannadreano_0-1658998576434.png

 

Hi I would like to know how to color a boolean cell depending on a condition. Do you know where we can do this (UX, module etc) and what formula we should put ?

- in green : the node is already created and unchanged

- in yellow : the node is already created but changed

- in red : the node is not created yet

 

A lot of thanks !!

 

Tagged:

Answers

  • @johannadreano 

    Any color formatting is based on numbered formatted line item. So to achieve what you want you have to create this line item. It has to be in the same module where you want to apply the CF.

    If you want to check whether anything has been changed you have to have the duplicates of the line items which are supposed to be criterias of the changes. In these duplicates you would store the submitted values which should be imported from the input. This way you would get "before" and "after" values which (when compared and combined) will define the value for color formatting.

  • Hi @johannadreano 

     

    That is a good questions and I remember it confused me for a long time on where to make the changes. I will try to answer your question in points

    1. We call 'coloring of cells' conditional formatting in Anaplan 
    2. You need a number formatted line item to set CF. You need a minimum of two numbers and max 3 and assign colors to the numbers. Basis your selection, you get the cells colored (either step wise or within a spectrum). 
    3. You can do it within a module in a saved view (usually not recommended) or you can do it directly on the NUX (this has more color/type options)

     

    In your case, you'd need to create a number formatted line item in your module, the formula would be something like:  IF  'the node is already created and unchanged' THEN -1 ELSE IF 'the node is already created but changed' THEN 0 ELSE 1. By doing this, we have given 3 numbers to ourselves (-1, 0 and 1). 

     

    Then you go to NUX and create the view you want to publish. You'll see this option:

    ankit_cheeni_0-1659011865181.png

    Click on the line item you want to use CF on, and then click this option. Rest is pretty straight forward, you select the number formatted line item that will drive your CF and select the colors against each number:

    ankit_cheeni_1-1659011957794.png