panchristo Posted May 2, 2010 Posted May 2, 2010 Hi there! I am trying to find a way to create abbreviations semi-automatically according to the way a user enters text in a field. For example, a table (which will be used as a VL) with two fields: staff specialty, specialty abbreviation. I would like the user to enter let's say TeChnician (in the 1st field) and a calculation produce an abbreviation (for the 2nd field) i.e. TC - taking into account the uppercase letters of the words entered. Is there any way to implement this? I couldn't find an expression to evaluate whether the letter typed is upper or lowercase. Perhaps someone could enter a special character before every letter to be considered as part of the abbreviation but this would ruin the appearance of the field's text. The case is really easy if more than one words (retrieving the first of each) are entered but thats not always the case, not to mention instances where the first letters are the same in different words. So, any ideas?
LaRetta Posted May 2, 2010 Posted May 2, 2010 (edited) Well, you can use: Filter ( staff specialty ; Upper ( staff specialty ) ) If several words are involved and if you wish to restrict to two resulting cap characters: Left ( TrimAll ( Filter ( staff specialty ; Upper ( staff specialty ) ) ; 0 ; 3 ) ; 2 ) ... however, I think you will still run into duplicates depending upon how many specialties you enter. You might want to include field-level validation. It would be easier to just create the abbreviation in your Specialties table. Then users can use pop-up menu, select the specialty by name, insert the abbreviation but display the specialty. And if you are going to do that, why not just use an auto-enter serial in your Specialties tables instead. If you trust that abbreviation in any way, and management/users decide they don't like the shortcut and want to change it, you can break your data which depends upon that combination. So if you still want to display abbreviations, I would still suggest an auto-enter serial as the primary key. :smile2: Edited May 2, 2010 by Guest added second calc
panchristo Posted May 15, 2010 Author Posted May 15, 2010 Thanks a lot for your time to answer, I think I'll stick to the simplest choice (pop-up menu).
Recommended Posts
This topic is 5364 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