How do I loop contents of Airtable column based on button click


I am building a gym workout guide.
I have the workouts in an Airtable database Each days workout is in 1 column with the various exercises in rows, with breaks in between. The 1st row is a flag which shows whether that days workout is complete or not.
The user will get a 12 week program.
He can complete 1 days workout and the DONE flag is set in the column so when he comes back the next day, he will be shown the next days workout based on a flag in the first row.

Now the things I want to know are:

  1. Each day will have different number of exercises. So how to count the number of rows in one column for that day?
  2. How will I loop through the different exercises from one column based on a when user clicks on Done? Need to know the block details
    For now I am just trying the get the exercise names on the screen. Will add the pictures later.
    All help will be appreciated.

You will call the column. put the result into an app type variable named rawData (initialized as an empty list and reset as an empylist before each time the app calls airtable. put rawData into a loop. create a new “app type” variable, initialized as an empty list and name it filteredData in the loop, (again, set as empty list before each use also)

blocks inside the loop would read like

if not j = null or is text j empty
in list filteredData, add as last

after the loop

create another var if you want named listLength
set listLength = length of filteredData

now you have your filtered list of exercises and you know the number of items,
display list item 1,
after each button press,
increase the displayed items index by 1,
when index equal to or greater than listLength, navigate to screen “all done”

or something like that