I see a lot of great posts here, but none that address my issue.
The main "problem" is that I am new to FileMaker (and databases in general) and I have to tackle the reservation, invoicing, etc project created by a former employee. They did not complete the project but it is usable with some limitations/errors.
The first issue:
We have a 'booking number' field that is calculated using the 'arrival date' and first 3 of 'customer's last name'. The 'arrival date' is entered via calendar. Problem is that if the month and/or day is a single digit, the 'booking number' field will have slashes inserted in place of the number. If I setup the calendar to insert leading zeroes, they appear in the field, but not in the calculated 'booking number'. However, they do appear in the 'booking number' if the date is entered manually. The easy fix would be to enter the date manually instead of using a calendar, but I would prefer an easier and less likely to error method.
These are the two fields used for the calculation:
'booking number' = (trim booking number)&Left(client Last name;3)
'trim booking number' = Middle ( arrival date ; 1 ;2)&Middle (arrival date ;4 ;2 )&Middle ( arrival date ; 9 ; 2 )
I have tried a number of different functions in place of "middle" without success.
There is a "part 2" to this that I have absolutely no clue:
Sometimes, the booking requires a one-way departure, so no entry in the 'arrival date'. My fix is to enter the 'departure date' in the 'arrival date' field so that the booking number can be calculated. Is there a way to have the program look into the 'departure date' if the 'arrival date' field is empty and then use that date for the 'booking number' calculation?
I appreciate any help provided and will, very likely, have a few (probably many...) more questions. I hope that my explanation is understandable.
Thank you!
Pete