5 Replies Latest reply: Feb 26, 2013 8:35 AM by Filip Larsson RSS

    Field selection as if clause in expression

    Filip Larsson

      Hi!

       

      I have an expression in one of my objects that look like this:

      IF(vVar=1,sum(IF(StatusChange<>'Deleted',Revenue)),sum(IF(StatusChange<>'Deleted',Contribution)))

       

      It has worked fine, until today when I realized that using a bookmark didn't trigger my variable that is defined when selecting a specific field, call it Field1. In other words, when I select Field 1 (which is a check box) I have a trigger on that field that are setting the variable vVar = 1.

       

      Instead of using the variable vVar as IF clause I would like to use the value of the field as IF clause to use either Revenue or Contribution as stated above. Something like:

      IF(Field1='Value',sum(IF(StatusChange<>'Deleted',Revenue)),sum(IF(StatusChange<>'Deleted',Contribution)))

       

      .. but I can't get it work. How to do this?

       

      Thanks in advance!

       

      Best regards,

      Filip