Autofill "New/Repeat" field for new or returning guests
I'm still quite new to FM (Pro, 10.0v3, on a Mac with Leopard installed), and am running into the following problem.
When taking bookings from a (prospective) guest, I would like to see the field "New_Repeat" on the booking form autofill, based on a test of whether he/she has booked with us before.
Bookings are made in a "Bookings" table. Guest details are kept in a "Guest" table. The "Guests" layout has a portal, which shows all bookings a guest has made in the past. Bookings get assigned a Booking_ID, which is one of the fields in the portal along with booking date, cottage, period, etc. Booking_ID in the portal triggers a script to take you to the record for that specific booking.
My thinking was to use a calculation for the "New_Repeat" field, as follows:
If ( not IsEmpty ( Guests::Booking_ID ) ; "Repeat" ; "New" )
hoping that this would refer back to (one or more) previously taken booking(s), with their respective Booking_ID(s), in the portal.
This does not appear to work. Strangely, this calculation gives exactly the wrong result: "New" for repeaters (and non-repeaters, I should add). When I modify the formula, by deleting the "not", non-repeaters and repeaters alike get assigned "Repeat".
It'll be my misunderstanding things, but I would say that's not right, but I cannot find why, or how to remedy this.
Any help is appreciated.