Jump to content
GarthT

Using value lists based on another table - which technique

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Who Viewed the Topic

    1 member has viewed this topic:
    Terrible Toll 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.