jeffe Posted November 22, 2003 Posted November 22, 2003 Hello Everyone, I'm only new and using FM6 (Windows), I have designed a small database which I need to do the following: On the left hand side my portal diplays a company name without repeating the same name. EG: Jeffe Incorporated Luke Enterprises Fashion Australia And on the right hand side I need to be able to diplay another portal that will display mobile phone numbers for example when I click on "jeffe Incorporated" it will display something like this.... Jeffe Incorporated 0411111111 0422222222 0433333333 0444444444 0455555555 At the same time if I want to add a new company it will automatically be put at the end of the left portal. I have managed to do this but when I have a company with for example 10 numbers it also displays the company name in the left portal 10 times. I think I'm after a script but not sure. Thanks jeffe P.s... If this does not make sense let me know and I will attach my file...
Fenton Posted November 22, 2003 Posted November 22, 2003 It's hard to tell from the photo how many files you have. (I tried the Windows menu but it didn't work -) I'd say you need 3 to do this, Main, Phones and Notes. Each company in Main would have a unique auto-entered serial ID. Both Phones and Notes would also have the ID field, but as regular fields. The relationships would be from Main, on the IDs, probably with "allow creation" and "delete related records" checked. Then you'd be able to add a phone# or note in the last empty portal row. Actually, I wouldn't do Notes like that. I'd uncheck "allow creation," and use a button and script to creat a note record (with the correct ID, very important, passed via a pair of global fields). I'd sort the Notes_ID relationship descending on Date and Time created, so the new row would appear at the top. This way allows unlimited notes, while still being able to see that latest. [There is a more advanced method to use a "dummy" relationship to create the note and lookup the real ID. Then you can put the 1 dummy row at the top, so it looks like it's part of the portal beneath. Slick but tricky.] Your portal of companies on the left may be a good idea, especially if you were to "filter" the list. But it makes things more complicated. You may want to get the two right portals working correctly in a Form view layout in the Main file first, without the left portal, just on the company's record. The layout you show above could be achieved, by basing the two portals on the right on relationships using a global ID instead of the "real" ID field, set via script from a click on the company in the portal on the left. Or you could Go To Related Record [show, "Left portal's relationship"] with a click. This would effectively put you on the company's record, so portals based on the regular ID field would work. There's more than one way to do this. Why don't you set up the 3 files, try a bit with a few records, then repost with the files, if they're not too large. [Those aren't really layouts in that "Layout List" are they?]
ESpringer Posted November 22, 2003 Posted November 22, 2003 What's not clear is: What's the home database for these portals? How is the home database *related to* the company portal? How is the home database *related to* the mobile portal? Here's what I'm guessing, based on your picture: You're working out of a companies database. Although you have a portal at left, it's functioning as a self-join "Hot index". In order words, clicking on a company name automatically puts you on that company's record. Then, you have a relation between this companies file and a phone numbers file, based on a match of company name. So, when you're looking at a company record, all the corresponding phone numbers appear in the portal. The problem seems to be that instead of creating new phone records, you've been creating new records *in* the companies database. That would explain why you're getting ten versions of the company name in the left-hand portal. To enter a new phone record without entering a new company, you either need to open the phone numbers file and enter the record there, or make sure that the relationship used in your phone numbers portal has enabled the "Allow Creation of Related Records" option. Then, if you just click on the first blank row underneath your existing records, you can start typing in new data, and a new record will automatically be generated in the phone database. Does that make sense? -ESpringer
jeffe Posted November 23, 2003 Author Posted November 23, 2003 Hello Guyz, Thanks for the response, I understand what I need to do but don't know how to do it. If I post the file is it possible that I can get a helping hand. Thanks jeffe... & really greatful for the response...
Fenton Posted November 23, 2003 Posted November 23, 2003 Yes, it is possible, even likely, though it is the weekend and kind of slow -) As I said in my earlier post, I believe it should be 3 files, Main (companies), Phones, and Notes. We just need a few illustrative example records. This is assuming that you have several phones per company, rather than just a couple (which could be handled alternatively with a repeating field). Further, is there any other info that goes with each phone#, like who is associated with it? In that case you may need another file, People or Positions. Or, alternatively each person is a record in your "main" file, and the "company" is an ID field, with a self-relationship to tie those people together. In other words, you generally need 1 file for each "thing" that has 1 entry. Sometimes not, if it's only a couple, or is a fixed few, and is dead simple; but usually yes. The specifics of how the structure is set up depends on the actual data you've got (lots of companies, no specific people; or some companies, several people per company; or lots of people, each a separate company), and the business rules of what you're trying to do. We can only guess at that without more information. With a separate file for each entity the structure is more relational and flexible, but more work is needed for finds, reports, etc..
jeffe Posted November 23, 2003 Author Posted November 23, 2003 Hi guyz, You people are just too good I will post my file please update is you believe is best. Please note, that on the left hand side I need to be able to apply new companies as I get new clients. I will need to be able upon CLICK that any info will be displayed instantly on the right hand side. On the right hand side some companies may only have two numbers and others may have 200 numbers. Each number has a SERVICE USER, MOBILE PHONE, PLAN ETC... ETC... as shown in the above pic. Thumbs up to the Guyz & Girlz at file maker for this excellent product. Also Thumbs up to this great forum... This product is by far worth its price. I was using a proggie called hmmm Access I will no more use this product again... Thanks again.... Jeffe P.S. make any changes as you wish, please note that its not finished and thats why some fields are not in there correct places...
jeffe Posted November 23, 2003 Author Posted November 23, 2003 Sorry I forgot the file.... here it is jeffe Main Database.zip
ESpringer Posted November 23, 2003 Posted November 23, 2003 Somehow the file is not downloading smoothly... I'm not sure if it's just this file or all fmforums stuff...
Lee Smith Posted November 23, 2003 Posted November 23, 2003 As a test, I just downloaded it without a problem.
Fenton Posted November 23, 2003 Posted November 23, 2003 Here is my version of the files, with separate Phones and Notes files. I renamed, simplified, deleted fields and scripts and generally messed about your original files; so you'll have to take the general idea and apply to your files. CompanyPhones.zip
jeffe Posted November 24, 2003 Author Posted November 24, 2003 Hi There Fenon and others, This is great, just what I was looking for. I have spend about 3 weeks trying to make it work and I'm sure you did it in 5 minutes... Thanks heaps, I will continue with my work only to probably post the next problem jeffe... P.S... If anyone has any other idea's please go ahead and make the adjustments or just post your valued thoughts...
Recommended Posts
This topic is 7674 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