aldipalo Posted January 27, 2009 Share Posted January 27, 2009 I thought this would be simple, but, it's driving me crazy! Here's what I'm trying to do. I have a text field fk_UnitID that contains the following type data. I-02F or II-04G or I-12A, etc. The I or II denotes the Building and the right side the apartment. I set up a calculation to get the Building from the UnitID: Case( Left(FK_UnitID;2) = "-";Left(FK_UnitID;1); Left(FK_UnitID;2) ) My problem is I get the II if the unit is II-02F but get, I- if the unit is I-12A. I just want I. What am I doing wrong?: TIA Al Link to comment Share on other sites More sharing options...
comment Posted January 27, 2009 Share Posted January 27, 2009 If the format is consistent, i.e. there's always a letter just before the hyphen and a numeric character immediately after, you can use: LeftWords ( UnitID ; 1 ) Link to comment Share on other sites More sharing options...
aldipalo Posted January 27, 2009 Author Share Posted January 27, 2009 Excellent. I tried Leftwords, but I was doing doing some fool thing wrong because it just wasn't working. Thanks for the quick reply. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5566 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now