May 25, 200718 yr Hi, I try to write an on-line examination system. In this system, I have an item store table, which hold all tests item for student. Once the student create new examination, the system should copy some records from the store (for example, 2 of 3) randomly for this examination. How can I to define the relationship? Sample file is attached. Thanks in advance. Exam_2007.zip
May 28, 200718 yr Without looking at your file (cause I can't be bothered, sorry!) I could suggest the following: You need two relationships: the first lists all possible questions. Use it to generate a value list of primary keys. Using some nifty string functions, randomly pull the two or three values from the value list and put them paragraph delimited into a global field as a multi-key, and use this multi-key in the second relationship. The random records will be displays in creation order. To randonly sort them, create an unstored number calc field with the function "Random" in the questions file and specify the portal to sort by this field.
Create an account or sign in to comment