5 Replies Latest reply on Dec 10, 2009 2:18 PM by DLake




      Parsing & Testing if Text or Number


      We have a field in our db soon to be used for both Canadian postal codes and US zip codes (but currenly only zip codes).  I'm currently pulling the left 3 characters of the zip to determine the appropriate shipping zone.  (ie 63343 results in 633 and the match in my zone table = 5, zone 5 then determines shipping rate per lb).

      We are starting to sell into Canada where postal codes start with an alph character (ie, L4325, H4432).  I'd like a calc that does the following:


      Determines the postal code origin by testing the first character in the field to determine if it's a alpha or numeric character.

      If alpha, then pull the first left most character (a single letter)

      If numeric, then pull the three left most characters (the first three of the US Zip)