List setup on the homescreen

Summary

On the Home screen, display the user’s next planned workout (the earliest upcoming workout that is not completed) and directly underneath it display the exercises belonging to that workout, including sets and reps. Current challenge: the exercises list cannot be correctly scoped to the selected “next workout” record. The exercises that are shown now, don’t belong to this workout.

Problem Statement

We can successfully fetch the “next workout” on Home using list filters/sorting. However, we struggle to bind the exercises list to that specific workout record. Without correct scoping, the exercises list either shows the wrong exercises or cannot be filtered reliably.

We should not add dates to each WorkoutExercise record, because exercises must remain reusable across sessions/templates.

Goals

  1. Home always shows one Next Workout card (or an empty-state CTA if none).

  2. Home shows a list of WorkoutExercises that belong to that Next Workout.

    Does anyone have any advice on how to fix this within my app?

    Thank you in advance.

Hi, how are you? From what I understand of your post, you want the user to be able to see the next workout routine on the homepage, and when they press the button, go to a screen with the routine information, including the exercises with the number of repetitions, etc.?

First, you need to make sure the exercises correspond to the routine. Therefore, you need a database of routines and another of exercises.

The routine must have items that correspond to the exercises.

You can add a numerical field to the routine, for example, arms 1, legs 2, abs 3, etc.

So, I would do the circuit like this.

The user selects the routine, views it, and clicks “Start.” When they click “Start,” the routine number is saved in a field for the logged-in user. The user then completes the routine, and when they click “Finish Routine,” it’s saved in the completed routine database. The logged-in user’s routine is then updated: “Routine+1,” so, for example, the number 2 will be saved there.

Then, in the “Home” section, in the “Next Routine” list, you can filter it to show all routines where the number matches the user’s routine number, but not all routines that are already in your list of completed routines.

I hope my idea is clear enough to understand. Good luck!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.