Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

This has to be so simple but I have tried everything I can think of for two days trying to get it to work.

 

I have 3 fields (Flight_Date, Flight_DepartureTime, Flight_ArrivalTime)

I need a function that will take the departure time and the arrival time and determine if the arrival is on a later date.

 

For example; let's say that on June 4, you have an evening flight the leaves Ft. Lauderdale at 6:35 pm and arrives at Albany at 12:01 am the next day.

 

On my printout, it want it to display as "Departs: 6:35 pm                Arrives: 12:01 am (Jun 6)"

 

Every way I have tried to accomplish this using nested If statements and Case statements turns out wrong.
If I can get it to show up correctly on said flight, it also shows up on other flights that are not within the same parameters. For example; departing at 10 am and arriving at 1 pm (as below).

ArrivalDate.png

This was achieved using the following string...

 If ( Departure_4 ≤ "11:59 pm"; If ( Arrival_4 ≥ "12:00 am"; ""; ""); " (" &  Left (MonthName (Date_4+1);3)& Day (Date_4+1) & ")");

 

For clarification purposes, there are also the same fields for flights 1 thru 7. What you see in the image is Flight 3 and Flight 4.

 

Thanks in advance,

Charlie

Posted

Assuming no flight is longer than 24 hours, you can use the test:

DepartureTime > ArrivalTime

to determine if you need to roll the date one day forward.

 

 

 

For clarification purposes, there are also the same fields for flights 1 thru 7.

 

 

Now that (numbered fields) is never a good idea; if you have multiple flights, use multiple records in a related table.

Posted

Why not use Timestamp fields for departures and arrivals, and then create calc fields for just date and/or just time displays?

 

ArrivalTimeDisplay = Time(Hour(ArrivalTimestamp); Minute(ArrivalTimestamp); 0)

DepartureDateDisplay = Date(Month(DepartureTimestamp); Day(DepartureTimestamp); Year(DepartureTimestamp))

Posted

Now that (numbered fields) is never a good idea; if you have multiple flights, use multiple records in a related table.

I would love to comment but due to the printing restrictions of portals (not resizing), it makes my itineraries look somewhat amateur-ish. Some of the flights on a given trip do not have all the fields occupied therefore leaving gaps between flight legs.As you can see in the example below, some of the flights might have a footnote attached and some might or might not have layovers.

I did however place the passengers in a related table and as a portal on the printed itinerary.

FlightItinerary.png

It's not perfect but a little more tweaking will get it there.

Posted
due to the printing restrictions of portals (not resizing), it makes my itineraries look somewhat amateur-ish.

 

Well, you could print from a list view (of the child table), or use calculations/script to combine the related child records into a text field (in the parent table) for printing. Beats having to do the same thing 7 times.

Posted

Well, you could print from a list view (of the child table), or use calculations/script to combine the related child records into a text field (in the parent table) for printing. Beats having to do the same thing 7 times.

I would love to do this. Most airlines and flight numbers follow the same itinerary if they are leaving from the same airport.

This method would save a ton of fields in the flights table, allow me to use lookups and allow me to post more legs per trip.

The reason I am doing this as I am is because, lets say I have one passenger flying from Dallas to Chicago, another from Nashville to Chicago and still another from Denver to Chicago.

Printing from a list view allows me to only post one flight itinerary per printed page. With the method I am using I can print all three on the same page saving the management team paper and saving me a bunch of aggravating phone calls asking me to print them all on one page.

This is a problem I would love to know how to solve so, if you know of a way to print from list view and still print multiple flights to a page, I'm all ears. After all, time saved is $$ made.

Posted
Printing from a list view allows me to only post one flight itinerary per printed page.

 

 

I don't see why there would be such limitation.  But I don't quite understand your overall structure: in the example in post #4, you have three passengers sharing the same flight itinerary; now you're speaking about three passengers, each having a different itinerary.

Posted

Alright. Let's say you have nine people in a touring group. One lives in Nashville, one in Dallas, one in Denver, one in Atlanta and five in Chicago. The tour bus picks everyone up in Chicago.

You have to get the four out-of-towners to Chicago to meet the bus.

Now, if the first show is in Indianapolis the next day it's a simple 4-hour drive to get everyone there but say there is a show in Los Angeles two days later. The bus can't feasibly make a 2,000+ drive in time so it's considered a 'fly date'.

 

At that point, all nine get on the same flight in Indy. This is where the multiple passengers come in.

 

Before this db update, I was listing each flight/passenger combination separately on one page which basically meant the I was both entering and printing the same flight(s) anywhere from one to nine times or more. There was way too much time involved and potential for mistakes involved with that method.

 

I know the example doesn't make much sense without see all the details but you kind of get an idea of how it was done.

FlightItineraryOld.png

Posted

If I understand this correctly, you should have a structure that looks something like this:

 

post-72594-0-82177500-1390395983_thumb.p

 

Or possibly, if a person can take part in some legs of a trip only:

 

post-72594-0-79279100-1390396001_thumb.p

 

That way nothing needs to be duplicated, and itineraries can be printed from the Tickets table, grouped by Trip or by Person as needed.

This topic is 4015 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.