4 Replies Latest reply on Nov 20, 2012 3:05 AM by obidon

    A little relationship advice...

    obidon

      Title

      A little relationship advice...

      Post

           Afternoon

           The attached is a screenshot of a simplified version of a database I am working on.

           The database is designed to carry out an audit.  The user will utilise the test table and answer yes or no to a series of fixed predetermined questions.

           The questions are currently in the "Inspection Items Table"  and there are several thousand questions. The 'items' are catergorised using the sections table .  All questions are required, sorted by section and item number and will be used for every test.

           Please can you advise me how to connect my test and items tables please?

      Screen_Shot_2012-11-15_at_16.26.29.png

        • 1. Re: A little relationship advice...
          philmodjunk

               An audit is basically a kind of survey. One table lists each question to be asked in the survey and a related table lists each response by each respondant to each of those questions. Make those Inspection items and tests instead of questions and responses, and you would have much the same thing.

               Take a look at this thread and see if it helps you see how to link things up so that they work: Need aid on generating a report from a survey layout.

               If that doesn't help, post back here and we'll take another run at it.

          • 2. Re: A little relationship advice...
            obidon

                 Thanks Phil

                 I've simplified my file to eliminate language issues from our discussions.  My tables are now Tests, Questions & Responses. Each Test will ask a pedetermined set of Questions and the Responses will be recorded. Lets assume I have 10 standard questions

                 So my initial understanding is that I have been looking at it backwards.  ie 10 fixed Questions will have many responses.  

                 Am I right in thinking that each response record will contain the TestID, the QuestionID and an Answer.

                 And if so, each time a new test is created, a script will have to create a set of (10) response records, one for each question and  with a fixed TestID?

            • 3. Re: A little relationship advice...
              philmodjunk

                   You appear to be understanding the concepts of the thread to which I directed you.

              • 4. Re: A little relationship advice...
                obidon

                     Thanks Phil

                     That is now working a treat.  Took me a while, because I tried to be too clever with my tables, but I learned that if filemaker isn't doing what you want, you probably want it to do something else.

                     I owe you a bottle of something