6 Replies Latest reply on Jul 28, 2010 11:09 AM by philmodjunk

    Linking multiple fields to a field in a separate layout

    dg3321

      Title

      Linking multiple fields to a field in a separate layout

      Post

      Is it possible to link multiple fields from one layout, to one field from another layout?  I'm trying to create various buttons on the main page of my database for easy navigation.  All of the fields i'm linking have the same type of information and i want it linked so it goes to its specific related layout.  File Maker Pro is only letting me set this up for one button instead of the multiple buttons i need.

      Any suggestions?

        • 1. Re: Linking multiple fields to a field in a separate layout
          philmodjunk

          Can you spell out step by step what you are doing and where you get stuck?

          This should be possible, but the details as to how you've attempted to set this up are critical.

          Also keep in mind that you need to know in what record and table your fields reside--not just the layout as different layouts may refer to the same or differnt tables and the same or different records depending on how you've designed them.

          • 2. Re: Linking multiple fields to a field in a separate layout
            dg3321

            In basic terms, i have a main page which lists my tenants in fields labeled tenant 1, tenant 2 etc.  Say for example there are 10 tenants.

            I also have a layout which is the rent statement for each tenant.  In this example there would be 10 records in the rent statement layout.

            On the main page, i want the text for each tenant name to be a button that will take you to that tenant's rent statement.  

            Under the relationships tab, i have set tenant 1, tenant 2, etc.. on the main page set to = 'tenant' on the rent statement layout.  I'm assuming that i'm messing up something in the relationships part.  This worked when i tested it out with just one tenant.  But when i added all tenants in the main page, set to equal 'tenant' on the rent statement layout, then the buttons stopped working.

            • 3. Re: Linking multiple fields to a field in a separate layout
              philmodjunk

              First problem I see is this:  "i have a main page which lists my tenants in fields labeled tenant 1, tenant 2..."

              You really, really need to redesign this table so that each tenant is listed in a separate record of a different table. This will greatly simplify the relationships linking tenants to their rent statements as you will need just one--not a new one for every tenant field. You can list all your tenants on a single screen if you set up the layout as either a table or list view.

              You also should use a serial ID number in your tenants table to link to your tenant statements. You get tenants with the same names, people change their names due to marriage or other reasons, name get entered incorrectly ... you'll have problems in all three cases if you link by the name.

              Once you've made those changes, you can use a button that either performs a find or uses Go To Related records to bring up the matching tenant rent statements.

              If you decided to use Go To Related Records, use it carefully. If you have filemaker 11, look it up in the filemaker help system. If you are using an older version, see this link: The Complete Go To Related Record

              • 4. Re: Linking multiple fields to a field in a separate layout
                dg3321

                Ok, i'll try that.  Thanks.  I had an idea that my structure was wrong, i've just had a hard time getting a hold of the more advanced skills, like the ones you mentioned above so far.

                • 5. Re: Linking multiple fields to a field in a separate layout
                  dg3321

                  Is it still possible then to set up a main page listing all of the tenants on one screen, with a button to then link right to the rent statement?  Or is that even not necessary now?  I could also just do a quick find in rent statements to find whichever statement i need to get to, but i wanted to create a more functional database where the main page has an overview listing all tenants for each building i have, which could then link to the rent statements.

                  • 6. Re: Linking multiple fields to a field in a separate layout
                    philmodjunk

                    Once you have a layout to list all the tenants, you can set up the field as a button or, if you use list view, you can place a button in the row that uses one of the two scripted techniques I mentioned earlier to find the related rent statements.

                    Here's a scripted find approach:

                    Set Variable [$TenantID ; value:  Tenants::TenantID]
                    Go To Layout [RentStatements]
                    Enter Find Mode []//clear the pause check box
                    Set Field [Rent::TenantID ; $TenantID]
                    Set Error Capture [on]
                    Perform Find[]
                    Sort [no dialog ; restore]