1 Reply Latest reply on Sep 16, 2011 10:44 AM by philmodjunk

    FileMaker Pro



      FileMaker Pro



      Operating system version

      OSX Lion

      Description of the issue

      Hi everbody,

      I have 3 tabels (Customer, Company, and CustCom) and have the Customer tabel linkt to CustCom. And Custcom linkt to Company.

      Tabel Customer has its unique CustomerID
      and Company his own CompanyID and
      CustCom has CustomerID and CompanyID.

      Now I want to see by customer to which company it is linkt.
      So i have a portalscreen by customer where i can select the company and then i see the customer by the company.

      Now i want to make a button by customer layout to create a new company and automatically fill the CompanyID in the portal list by the Customer.
      I make a script but it isn't working. The script goes to the company layout creates a new record and then goes back to customer layout and then goes to the field CompanyID.
      Then I use this code: GetNthRecord ( Mens_Bedrijf::BedrijfID ; +1 ) to fill in the CompanyID.
      but the CompanyID isn't automatically filled in. I still have to choose the new CompanyID in de list.

      Can someone help me with my issue?

      D. v. Burik

        • 1. Re: FileMaker Pro

          This portion of the forum is intended for reporting possible bugs in FileMaker Products. Did you notice the warning to that effect when you filled out the Report an issue form? Wink

          Posting this type of question to the FM Pro Forum (see tab at top of screen) is more likely to get you a faster response and from more forum participants.

          Your script needs to also create a new record in the CustCom join table.

          Add this step to the very beginning of your script:

          Set Variable [$CustomerID ; value:  Customer::CustomerID ]

          Add these steps to your script right after creating the new company record:

          Set variable [$CompanyID ; value: Company::CompanyID]
          Go To layout ["custcom" (custcom)]
          New record/Request
          Set Field [CustCom::CompanyID ; $CompanyID ]
          Set Field [CustCom::CustomerID ; $CustomerID ]

          Then when you return to your customer layout, you should see a new, blank record in your portal.