Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I have a system where records are created for a Hotel.fp5 from within Events.fp5.

I use the relationship hotel = ::hotel

The fields in Events.fp5 are:

Hotel, ::HotelAddress , ::HotelCity, etc.

This works great except when you want to edit the hotel name after a record has been created. When you change the hotel name in Events.fp5 it creates a new record in Hotel.fp5

I know there is a basic rule here that I am missing to keep the system easy-to-use, but more flexible.

The basic rule is to not use names to establish relationships. Use unique ID's that will not change.

You should probably use a different key to attach the two files. Usually each Hotel record would have a serial number, or ID #. Make sure it's unique.

When you create a new Event, make sure that Hotel's ID is entered into the proper field to establish the relationship. There are many ways to do this.

If the relationship between Events and Hotels is based on ID's, then when you change a Hotel's name, its Events will still be linked.

HTH

Sharka's point is very good, you should use serial numbers for relationships, but you should also turn off "Allow creation of related records" (in the relationship definition) since you are not creating new hotels from the Events database.

  • Author

Thanks for the response. The hotels do have unique IDs, but what is the relationship between the Hotel ID and the Event? Where do I store the Hotel ID in Events.fp5?

I want the user the be able to enter the hotel name and, if it is already in Hotel.fp5, all the relevent info (address, city, etc) to automatically fill in.

Also, I am creating new Hotel records from within Events.fp5

what is the relationship between the Hotel ID and the Event?

Using ID's is simply better because there is no risk of duplication, misspelling, etc.

If you really want them to be able to enter the Hotel name in the events database, you might considering using two relationships, so that the Hotel Number is a lookup based on the Hotel name relationship, and the rest of the fields are lookups based on the hotel number relationship.

If there aren't a lot of hotels, you could do the above with a value list to make it even easier.

Alternatively you could have users find the hotel first (in the hotel database) and then click a button to create a new event with that hotel.

Also, I am creating new Hotel records from within Events.fp5

This is the cause of the problem you mentioned above:

When you change the hotel name in Events.fp5 it creates a new record in Hotel.fp5

You can't expect FileMaker to "know" when you want a new record, and when you don't...

Alternatively, you could put a button on your events layout that creates a new hotel in the hotels database, where you enter the information, and then return to events. This process could be scripted so that the user may not even notice the transition (using a special layout in hotels, and then returning them to events with the new hotel entered in the record).

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.