January 3, 20179 yr Hello I am trying to create solution for examination questions. Each question can be allocated to one of 38 key topics and only one of 38 topics I have decided to do this using a value list based on a table of Key topics Each Key Topic has a name and a code (an alphanumeric value) In the Question layout I want to have a drop down menu to chose the Key Topic and have the code auto-populate using a related field. I am struggling to understand the relationship because the Question seems to be the parent in the relationship, but it can only have one child - so seems to me to be a one to one relationship or an attribute!! When I design the relationship diagram and join the fields Key Topic to Key Topic - FM draws this as a many to many relationship, which seems wrong (Technique 1) So I redesigned the database using a join table (Technique 2) - This also seems wrong because one question can only have one Key Topic Line Item and not many. Paradoxically, both techniques seem to work in practice. I am worried if I use this technique I might end up in trouble further down the line. Any advice / clarification? Many thanks Garth Value List technique 1.fmp12 Value List technique 2.fmp12
January 3, 20179 yr 7 minutes ago, GarthT said: I am struggling to understand the relationship because the Question seems to be the parent in the relationship, No, Topics is the parent. A question can have only one topic, but (presumably) a topic can have more than one question. 3 minutes ago, GarthT said: FM draws this as a many to many relationship That's because it doesn't know that the matchfield on the parent side is supposed to be unique - so either validate it as unique, or use a field that auto-enters a serial number. 6 minutes ago, GarthT said: When I design the relationship diagram and join the fields Key Topic to Key Topic - You should be using either the topic Code or a TopicID (auto-entered serial number) field as the matchfield. Otherwise you won't be able to rename a topic without breaking existing relationships. 5 minutes ago, GarthT said: In the Question layout I want to have a drop down menu to chose the Key Topic and have the code auto-populate using a related field. As stated, you should be choosing the Code. And there is no need to populate any other field: simply show any related field from Topics on the layout of Questions (make it non-enterable to prevent accidental modification). --- Sorry, I cannot look at your files.
January 3, 20179 yr Author Thanks Somehow it seemed conceptually wrong for the Topic to be the Parent - as the question is the "main event" I think I just need someone to tell me that was OK for it to be the child even though it is the meat of the project!! OK - I think if I use the relationship in the correct way everything else should fall into place. I will get it a go cheers Thanks again Comment I think it now works Value List technique after Comment.fmp12
Create an account or sign in to comment