Jump to content

seeing more than one related record


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

Recommended Posts

I have a file called 'hotels' and it is related to a file called 'events'. At present I hac have one displayed hotel for every event. How can I display the data for hotel 1 in one set of fields and hotel 2 in another in the same event record? Do I need 2 relationships instead of 1? How would I distinguish them? Thanks for any ideas.

Link to comment
Share on other sites

You may need another file as well. I am assuming that one hotel can have bookings for many events - and also that one event might involve booking many hotels.

If this is correct, then you will need a bridging file in which one record would contain details of one hotel booking for one event. This will resolve the many-to-many relationship.

Your hotels file then needs to only contain hotel data, and you events file, events data. All you booking info is in the bridging file.

By creating portals in your hotels and events files, with relationships to the bridging file, you will then be able to view you data in a wide variety of ways.

Off course - if my inital assumption is wrong, then chuck all this in the bit bucket...

Russ Baker

Link to comment
Share on other sites

Thanks for your replies, but in this case a portal is not what I need as I never would need to see more than 2 hotels. I was trying to see if I would need to do this via a third bridging file or if it would be possible to do it more simply with just two relationships from the events file to the hotels one, the first one of which I have already working fine. As I have 7 files of data all working together now (in 3 tiers: tours containing events, events containing event info (hotels etc. in 5 different files), it may get nasty if I go the wrong direction with any big changes.

At present, I have the hotels come up as a conditional value list sorted by country in the event record and you just pick the one you want, or add one if it isn't in the hotels database via the buttons I have set up. Quite simple but works nicely so far. So far, I have had no need to collate or sort any of the data from the hotels file TO the events one, and it is always dealt with from the perspective of the events file, which is grouped and sorted by the tour file. Therefore, having the bonus of portals both directions would be excessive programming UNLESS it was a by product of something else...

... now, to get it modified to give me hotel 1 and hotel 2 for each event record from the same hotels file using the same value list is what I need to do. Does that explain it better? Can I do it with 2 relationships or do I still need a 3rd file? If so explain the relationships a bit for me will you? Thanks for any input.

Link to comment
Share on other sites

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