6 Replies Latest reply: Jun 7, 2017 8:02 AM by Graham Cooper RSS

    IF statement as a Variable for Background Colour

    Graham Cooper

       

      I have the following If which is setting the background colour in my straight table.

       

      IF(FORECAST_STATUS='CONFIRMED FDD',rgb(200,240,200),
      IF(FORECAST_STATUS='UNCONFIRMED FDD',rgb(255,153,0),
      IF(FORECAST_STATUS='NO FDD',rgb(255,80,80),'')))';

       

      On its own it works fine but so that I don’t have to amend it 2 dozen times I assumed I could set it as a Variable and apply the variable to the background colour instead.

       

      The set variable is scripted as follows in the first tab:

       

      SET vFDDSTATUS = '=IF(FORECAST_STATUS='CONFIRMED FDD',rgb(200,240,200),
      IF(FORECAST_STATUS='UNCONFIRMED FDD',rgb(255,153,0),
      IF(FORECAST_STATUS='NO FDD',rgb(255,80,80),'')))';

       

      My main concern is that FORECAST_STATUS doesn’t exist this early………………or is that not a concern when setting variable?

       

      Thank You