I don't think "solved from student" will work unless only one student uses any given copy of your database system.
Looks like you need a table of student responses to the questions. Records in that table can be linked to questions from your questions table by your script. You never actually copy the questions from one table to another, you just put an ID value in each response record that links it to a particular question.
Hi Phil, thanks for your prompt answer.
I know that I will need a table of answer from each student (otherwise, I would not have a way to compare their answers and I wouldn't update each status of each question). But, as soon as I have to create DB for each student (for answer and solved/unsolved) it will be a mess to control.
So, I was thinking of having DB for questions and, when a student access the layout, the layout will choose randomic an amount of questions, show to the student and it will wait for all answers.
Then, with all answers, it will be calculated his/her performance and raise a level, if he/she reaches a good amount of solved exercises.
I have 2 main problems:
1 - How to get an amount from a student and use it in a loop to get questions from DBQuestions (where, how to declare variables, how to use function random to generate a number (it will be used as IDQuestion_fk, etc)
2 - How to create a smart way to have SOLVED/UNSOLVED of each student without having to create specifics DB for it
I am looking for answers of both, but I think 1 is easier than 2.
Can you help me?
But, as soon as I have to create DB for each student (for answer and solved/unsolved) it will be a mess to control.
My point exactly, your current method for determing which questions have already been answered doesn't look like it will work for multiple students using the same file unless you are intending to eliminage all questions for which any one student has answered. (If student A answers a question it's no longer available for all students, not just student A).
If you want to eliminate questions that a specific student has answered so that the student does not get the same question twice, I think you'll need to use something more sophisticated than a single field in the questions table.
I suggest you set up a related table that links to Questions like this:
Questions::__pkQuestionID = Answers::_fkQuestionID
Students::__pkStudentID = Answers::_fkStudentID
See the first post of this thread for an explanation of my notation: Common Forum Relationship and Field Notations Explained
Now you can perform a find on the questions table to find all records that do not have a related record with a given student's ID to get all questions that a student has not answered.
What you are dealing with here very similar to a survey or questionaire--the difference being that you have right and wrong answers. This link on FileMaker Surveys may be helpful: Need aid on generating a report from a survey layout.
Once you have the basic structure in place, you can have a student enter a number into a global field and a script can find a set of unanswred questions, omit all but the number of questions specified in the global field and then can loop through them to set up a group of "answer" records linked to the current student and also linked to the question records pulled up by this script.