2 Replies Latest reply on Nov 12, 2011 4:04 AM by SteveJames

    Relating field values across layoouts

    SteveJames

      Title

      Relating field values across layoouts

      Post

      I'm new to Filemaker, my experience is Access, DBase ans SQL Server so please excuse any errors with definitions.

      I am building an simple application. Main table hold a Case and there will be multiple Transactions added to each case.

      I have created a Layout/Form for the Case table and I want to put a button on the Form to create payments.

      I can see how to move to the Layout/Form for the entry of a Transaction but have not been able to see how to automatically pick up the Case Reference from the Case Form and add it to the Transaction Form.

      I have tried scripts using Set Field but the field remains blank.

      Any ideas?

        • 1. Re: Relating field values across layoouts
          philmodjunk

          Remember how each "form" in Access has it's own specific Record Source?

          A similar situation exists with FileMaker. The current record on one layout will not automatically be accessible on another layout unless both refer to the same "box" (called a table occurrence) from Manage | Database | Relationships in Layout Setup | Show Records From.

          You have to "put the ID value in a bucket" carry that bucket to the other layout. Create a new record and take the ID out of the "bucket" and put it into the appropriate field of the new record in the related table.

          Set Variable [$ID ; value: Cases::CaseID ]
          Go To Layout ["Transactions" (Transactions)]
          New Record/Request
          Set Field [Transactions::CaseID ; $ID ]

          • 2. Re: Relating field values across layoouts
            SteveJames

            Brilliant Laughing

            Great instructions and it worked a treat.

            It was the Set Variable that I missed. I was looking for a way to put a variable on the layout.

            I can see I need to start thinking in a slightly differtent way.