1 Reply Latest reply on May 29, 2015 8:48 AM by philmodjunk

    AND statement in formula

    NigelBurton

      Title

      AND statement in formula

      Post

      I am trying to calculate a value in a field in a table that compares three items in the table with three items in another table and if all three match up then they return a value that is stored in a field in the other table.

      The formula I am using is 

      If(Vessel_#_1 = Vessel Schedule::Vessel  and  Vessel_Voyage_#_1 = Vessel Schedule::Voyage_# and Load_Port = Vessel Schedule::Load_Port;Vessel Schedule::Load_Port_ETD)

      It should return a date value into the field and the calculation is unstored.

      Can someone please advise why it is not working and a better way of achieving my desired out come.

        • 1. Re: AND statement in formula
          philmodjunk

          The calculation syntax looks correct. It would appear that one of the three comparisons are not True due to a value that doesn't exactly match. This could be something very hard to spot such as an extra space or return character in a text field. It might also be a relationship issue where your record with the fields Vessel_#_1, etc is not matching to the expected record in Vessel Schedule.

          You'll need to do some very careful checking.

          And if this is a calculation field, you'll need to also consider what is selected in the "context" drop down at the top of the specify calculation dialog as this can make a difference in the results returned.