Help with Simple connection

I hope this question isn’t too embarrassingly basic. I am trying to do a simple query/view. I have a students object and a workouts object. What I’d like to be able to do is simply add/assign a workout record for every student that performed that workout. I am using the Name field as the connector, but don’t know if that’s the best/right way to do it. Any suggestions or help is greatly appreciated. Thank you.

Hi @Bobby

I presume your students would do different workouts, not just one workout?
If so, you need to connect the Workouts object to your Students object as a one to many connection. (many workouts for each student). On your Students object you can change the display field so it shows the name of the student in the Workouts object.

Display Fields

Then create a page view with a table showing your Student object, add “edit” and “view” links as required. and a child table of related Workouts beneath each Student.

You can then add a form that adds a new workout to the student linked from a menu.

Happy to connect and walk you through this.
I can provide one-to-one training and consultation on a chargeable hourly basis.

You’re awesome Carl. I’ll give that a try and also check out the videos. Yes, it is a one-to-many relationship. Both ways, right? Where each student can do more than one workout…and each workout can be done by many students.

1 Like

One to many relationship between Workouts and Students.

Each Student can have many Workouts.
Each Workout connects to one Student.

As long as you add a connection from your Workouts object to Students object you can just except the connection defaults. :+1:

What is I want to build a workout template? Like this
Workout Example
DB Press: Field1_WeightUsed & Field2_Reps
DB Squat: Field3_WeightUsed & Field4_Reps

I want to be able to create a new workout record, then select the student and the workout he/she did. Then fill in those fields. How would l do that.

I know in Lotus Notes it was a subform LOL

A sub form may be different in Lotus Notes. :blush:

In MS Access a subform displays records that are related to the current record in the main form. It’s simply a way of showing child records related to a parent embedded in the same view.

Knack doesn’t use subforms, however, in my experience you can still create views that show the related data in a logical fashion.

You mention using a “template” for different workouts. This would require either using record rules to create the connected line items, which may become complex depending on quantity of templates. Or or use Make/Integromat to create them via the API.

It sounds like you are tying to “lookup” a list of workout line items (template) and connect them to the session and user.

Creating related records automatically connected to a user is possible, however, depending on how many line items you are creating for each workout, it will increase the amount of time it takes to create.

Typically, it takes about a second for each line item to be created. This may not be an issue if the users session covered 6-10 different disciplines.

Currently, if you have your app setup you will need to add each type of workout line by line.

I have many apps that have a “template” that Make/Integromat looks up and then creates the line items connected to the user. This works well if you have lots of different “template” options.

You’ll appreciate this may be complex and beyond the scope of a forum reply.