10 Replies Latest reply on Jan 15, 2020 1:24 AM by Jonathan Okusanya

    Creating Calculated Field with IF statement + OR for multiple options

    dhekar

      I am trying to create a Calculated Field with an IF statement that can take multiple options:

       

      IF [my_letter] = 'A'

           THEN 'Vowel'

      IF [my_letter] = 'E'

           THEN 'Vowel'

      IF [my_letter] = 'I'

           THEN 'Vowel'

      IF [my_letter] = 'O'

           THEN 'Vowel'

      IF [my_letter] = 'U'

           THEN 'Vowel'

      ELSE 'Consonant'

       

      Is there a way to write this in a simplified way with OR so that I don't need to repeat several times the same? Something like this:

       

      IF [my_letter] = 'A' OR 'E' OR 'I' OR 'O' OR 'U'

           THEN 'Vowel'

      ELSE 'Consonant'

       

      Thank you