Myron S. Posted November 24, 2006 Posted November 24, 2006 I'm wondering if there is a simple calculation formula for this: I have field that auto-enters a unique calculated "tourcode" for a bus excursion on a particular date. The code always ends with the letter "A" when there is only one bus for that excursion on that date. However, when there is more than one bus going to the same event, the code is the same except that it ends in "B", "C", etc., to identify the second, third or more buses. Is there a simple calculation or function that I can use in this field to automatically place the appropriate letter "A" through "Z" at the end of the code based on how many buses have previously been assigned? thanks in advance.
T-Square Posted November 24, 2006 Posted November 24, 2006 Well, I think you could do this with a combination of a relationship and a calculation. First off, I'd set up the number and the suffix as separate fields--TourCode and BusCode. They can be joined in another calc field easily enough. Add a second Table Occurence of the table to your Relationship Graph (let's call the first TourBus and the second BusCount), and connect the two TOs using TourCode. Finally, set your BusCode field to Auto-Enter a calculation (do not replace) Choose(Count(BusCount::TourCode); "A"; "B"; "C"; ... ) I think that might work for you. David
Recommended Posts
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