1 Reply Latest reply on Mar 21, 2016 9:35 PM by Chandra Shekhar Jain

    Using same value in calculated field more than once

    rahul.patel.2

      Hi,

       

      I am trying to create calculated filter but have some issue in it.

      For Example:- I have a field named as payment status. The field contains (Processed,Pending,Canceled,Failed). I am trying to create a filter using calculated field. The question is how do i use the same payment status again.

      I am able to create the calculation till below

       

      Please take a look at the Bold Conditions

       

      IF Payment_Status = 'Completed' THEN 'Closed'

      ELSEIF Payment_Status= 'Processing' THEN 'In Transit'

      ELSEIF Payment_Status= 'Canceled' THEN 'Cancel'

      ELSEIF Payment_Status= 'Failed' THEN 'Rejected'

       

      ELSEIF Payment_Status= 'Completed' OR Payment_Status= 'Processing' THEN 'Successful'

      ELSEIF Payment_Status='Canceled' OR Payment_Status='Failed' THEN 'Not Successful'

      END

       

      the calculation shows valid but when i add it to filter and show filter i am able to only see

      Closed, In Transit, Cancel, Rejected and the rest two as null.

      How do i fix this issue. Have tried using Paramenter and the same in case statement but get error Boolean is compared with String. Please help

       

       

      Thanks in advance.

        • 1. Re: Using same value in calculated field more than once
          Chandra Shekhar Jain

          Rahul

           

          Assume the Payment_Status is 'Completed'

           

          Then as per the above statement it would go through the first line in the if condition and assign the value 'Closed' and move out.

          It will never reach the statement in Bold.

           

          What would you want when the Payment Status is Completed (Closed or Successful or Closed Successful)

          As per the above statement it can be both.

           

          If you can give your exact requirements without the if condition then we can work at creating the statement. 

           

          Chandra