FORUM COMMUNITY IDEAS SHOWCASE LEARNING CENTER

How to Make a Table that Calculates Values On the Fly


#1

I’d like to make a workout app where a user can enter their max (highest weight they’ve successfully lifted), and it generates a custom workout with sets and reps. See the image below:

This example user entered 200lbs as their max, and so then the workout calculates various percentages of that max for them to lift on each successive set.

How would I accomplish this in Bubble?

Thanks!


#2

I like your idea.
What is the formula you use to calculate the various percentages?


#3

Hey Julie, thanks for your response.

The percentage of your max varies each set, and changes as you progress over the course of 7 weeks. Here’s the link to a Google Doc that has each set and its percentage listed. To answer your question, take a look at the % column on that doc.

I received this workout as a giant lookup-table with all possible maxes going up to like 500 lbs. It’s a great workout plan, but it’s a pain to cross reference that table every set! So I really want to create an app that does all the math for you, and lets you track your sets.


#4

Check out https://bubble.is/documentation . Under the video tab there is a link: Build a BMI calculator in Bubble

I’m thinking you may be able to use that example to figure out a work-around to get create what you need once you configure it for your formula. I havent used it myself but I see the potential and how it could help you.


#5

I watched the tutorial but I’m afraid it doesn’t help me much in my situation. It had the user enter data in fields and then performed a math calculation on that data.

What I need is to create a matrix / database that can be referenced to build out a table dynamically. I would assume bubble can do this… right?


#6

Hi @tomatohorse - yes you can pre-load the database with values and reference them for your calculations. Click on the “Data” icon on left of editor then click the “App Data” tab and you’ll see a “New entry” button to create from scratch. Once the entry is created, you can make any updates to the data fields (if needed) by clicking the little pencil icon. You may have a “Benchpress” entry, “Squat” entry, etc and each will have the pencil icon so you can manually make updates.