8 Replies Latest reply: Jun 13, 2012 6:24 AM by mrpjspencer RSS

    Expression returning nulls!

      Good afternoon, I have a problem with an expression I am using in a flat table, There is a field that has a value of either 1 or 2 for each BP, without a listbox restricting either 1 or 2 neither will show and returns a value of '-' a null.


      I tried the Expression :-


      if(Meter_Reading_Reason='01' and Meter_Reading_Type='01' or

      Meter_Reading_Reason='02' and Meter_Reading_Type='01' or

      Meter_Reading_Reason='01' and Meter_Reading_Type='02' or

      Meter_Reading_Reason='02' and Meter_Reading_Type='02',BP)


      I have tried to remedy the problem with the expression below (which doesn't work either)


      if(Meter_Reading_Reason='01' and Meter_Reading_Type='01' and Meter_Reading_Reason<>'02' and Meter_Reading_Type<>'02' or

      Meter_Reading_Reason='02' and Meter_Reading_Type='01' and Meter_Reading_Reason<>'01' and Meter_Reading_Type<>'02'or

      Meter_Reading_Reason='01' and Meter_Reading_Type='02' and Meter_Reading_Reason<>'02' and Meter_Reading_Type<>'01'or

      Meter_Reading_Reason='01' and Meter_Reading_Type='02' and Meter_Reading_Reason<>'02' and Meter_Reading_Type<>'01',BP)


      Meter reading type and meter reading reason vary over different meter reads, they can be 1 or/and 2. What I am trying to achieve is to load Value 'BP' if either Meter reading reason or meter reading type fit these criteria.





        • Re: Expression returning nulls!



          I guess there is some problem in the data. Can you share a sample of your application to debug?



          Kiran Rokkam.

            • Re: Expression returning nulls!

              Hi Kiran, there is no error in the code, the most part of the code is associative table link such as Customer<=>Contract<=>Property<=>Meter<=>Meter_Readings.


              Have I written the expression incorrectly, I am trying to write an expression where if Meter reading reason = 1 or 2 and meter reading type = 1 or 2 then return me customers (BP) that have these types of reads on their accounts, if they have meter reading reason/type other than 1 or 2 I dont want them.