Elkpodemiami Posted December 16, 2014 Posted December 16, 2014 Hello all. I have a question that it's not clear in my mind on whats the most efficient way of doing this. I have 2 tables: 1 - exercise Type ( id, name ) 2 - exercises ( id, type, name ) So in a layout i have a portal that is pointing to the exercises table, in the same layout I have a checkbox field with a value list that points to the exercise types For example: --- Exercise Types Bicep Tricep Plyos Sprints and so on... --- Exercises Bench Dips (belongs to Tricep) Rope Pushdown (belongs to Tricep) Broad Jumps (belongs to Plyos) Squat Jumps (belongs to Plyos) and so on... What I need to accomplish basically is that every time an "exercise type" is checked the portal adds up and displays the exercises based on that type, so the found set on the portal will increment as more checkboxes are checked. Thanks in advance. Lucas
Fitch Posted December 16, 2014 Posted December 16, 2014 If your relationship is based on the type field in both tables, that's about all there is to it.
Elkpodemiami Posted December 16, 2014 Author Posted December 16, 2014 Thanks for replaying I attached a copy of the file so you can understand better my situation. Regards. db.fmp12.zip
eos Posted December 16, 2014 Posted December 16, 2014 What Fitch said: if you have a field formatted as value list, the field can act as multiline key. But for that to work, you need to define your relationships, and your value lists correctly; in that case, a value list that is based on 1: field: primaryID, 2: a text field. Also, you're not matching the correct fields. Last but not least, in your file the foreign key exerciseType in the Exercises table doesn't hold the primary key from the ExerciseTypes table, but the body part name. I corrected this in the attached file, but you need to make sure that you insert that primary key when setting the exercise type, i.e. change the procedure that's in place. db_eosMOD.fmp12.zip
Elkpodemiami Posted December 17, 2014 Author Posted December 17, 2014 Perfect, thank you very much for the explanation as well as the solution. I checked the file and it made sense, I was not looking at the right data. I'm very appreciated for your help Eos. Regard, Lucas
Recommended Posts
This topic is 3924 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now