richshone Posted March 24, 2002 Posted March 24, 2002 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.
Rigsby Posted March 24, 2002 Posted March 24, 2002 You need a relationship in your events file relating to your hotels, not the other way round. Then you need a portal in your events file that can show as many rows (i.e. Hotels) as you wish. Rigsby
RussBaker Posted March 24, 2002 Posted March 24, 2002 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
richshone Posted March 25, 2002 Author Posted March 25, 2002 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.
Recommended Posts
This topic is 8336 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 accountSign in
Already have an account? Sign in here.
Sign In Now