3 Replies Latest reply on May 30, 2012 3:00 PM by philmodjunk

    Tabs and new record - newbie question

    RayGerman

      Summary

      Tabs and new record - newbie question

      Product

      FileMaker Pro

      Version

      12

      Operating system version

      10.7

      Description of the issue

      I have created a database with multiple tables and fields. I found that using tabs was easier than creating a layout for each table in my database. In my layout I have a Company tab and a Contacts tab. My Layout is linked to the Company table, tab 1 has fields from the company table; Tab 2 uses, relational fields pointing to the Contacts table.

      When I try to create a new record in the contacts tab, it is automatically creating a new company record, since the layout references the company table.

      Is there any way to make give the contacts tab the ability to add new records to the contacts table?

      Would I need to use a portal on the contacts tab to the contacts table to accomplish this?

      Should I just make a new layout linked to the Contacts table to enter new contacts records?

      Please let me know if you have any thoughts.

      Thanks,
      Ray

        • 1. Re: Tabs and new record - newbie question
          philmodjunk

          First thought is that you have posted this question in a section intended for reporting possible bugs with Filemaker software. Wink

          No need to repost, but if you have any other questions, be sure to click the FM Pro Forum tab at the top of this screen before posting the question and it will be seen by more folks and is more likely to get a timely response....

          Your question doesn't have just one answer and you'll need to weigh alternatives to use the method that works best for you.

          1) If you have multiple contacts for a given company record, then yes, you can put a portal to contacts on the tab. If you enable "allow creation of records via this relationship" for contacts in the relationship you use for the portal, you can add new contacts by entering data into a blank row in the portal and FileMaker will add the needed matching value to link it to your current company record.

          2) You can also put a button on this tab with a script that switches layouts to the contacts layout, creates a new record, gives it the match value needed to link it to the current company record and then returns to the layout--all hidden from the user. But this limits you to one contact per company unless you use a portal and if you are going to use a portal, see 1) above for a way not to need that button.

          3) Using a separate layout for contacts is always an option you can use and you can even use both methods if you find it useful to do so. In addition, some Filemaker layouts are designed to simulate a tab control but actually use a separate layout for each "tab". Clicking a tab to select a different tab actually clicks a button that changes layouts instead of bringing a different tab panel to the front.

          • 2. Re: Tabs and new record - newbie question
            RayGerman

            Hi Phil,

            I was having trouble with the FM Pro Forums section of the site so I took a shot in the dark and posted my question here. I will make sure to post any futher questons in the correct forum.

            I think I will just make a new layout for the contacts tab and simulate the tab experience with the go to layout script.

            I appreciate your input... its good to know I am on the right track.

            Many thanks,

            Ray

            • 3. Re: Tabs and new record - newbie question
              philmodjunk

              Note that with that approach, Filemaker does not link a new contacts record to a company record for you when you create a new record. You'll need to implement a method that links any such new records to a company record. You can format the match field in contacts with a drop down list of values from the company table and there are ways to set up scripts and auto-enter calculations that enter the matching value of the current record on your company layout, but it won't happen by itself like takes place in a portal where 'allow creation' is enabled.