2 Replies Latest reply on Jan 14, 2012 9:53 AM by PaulQuenzler

    Related table field update -- newbie

    PaulQuenzler

      Title

      Related table field update -- newbie

      Your post

      I have a preferences table , has a serial #, a record I'd, a default event file Id , and a default chapter I'd.

      Two other tables, events and chapters.  Each table has a serial, a record I'd, and other fields.

       

      Only one preference record must many event records, and many chapter records.  For a given usage of the database, I want to browse events, select the event and use a button on that browse to cause the record I'd of the event to be placed in the preferences table.

      Similarly, from the chapter table, browse to a desired chapter then again, a button to set the chapter I'd into the preferences table.

      Structurally, I have the Id fields in contacts and events related to the same fields in the preferences table.

       

      I am a newbie with some RDBMS experience with progress software corp language, but this is different.

       

      Thanks

        • 1. Re: Related table field update -- newbie
          philmodjunk

          I don't see the need for recordID fields. The serial number fields are all you need for primary keys in each table and calculation fields with Get ( RecordID ) what I'm guessing you mean by Record ID fields, are not a good option to use for Primary Keys. (Importing records from one FileMaker file to another--such as when an update is deployed or to restore from a backup, can change a record's record ID.)

          To link the current record on the Chapter layout to the current record on the Preferences layout, use this script:

          Set Variable [$ID ; value: Chapters::Serial#]
          Go to Layout [Preferences]
          Set Field [Preferences::ChapterID ; $ID ]
          Go To Layout [original layout]

          The script for event records will be allmost exactly the same.

          • 2. Re: Related table field update -- newbie
            PaulQuenzler

            Thanks for the input.  Things are starting to clear up for me as to methods