Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6576 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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

This topic is 6576 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.