Forum Academy Marketplace Showcase Pricing Features

Need Help with formula for tracking user's minutes!

Hi! I need help with creating an expression that will calculate the number of minutes that a user has available. I am storing the number of minutes that a user is allotted monthly as a field in the user’s data. The user is able to upload podcast episodes on the app which has audio length stored as a field of the episode data type. On the user’s dashboard, I would like to calculate how many episodes that user has with a release date (another field in the episode data type) in the current month. It needs to add up all of the audio lengths of these episodes and subtract it from the current user’s allotted minutes. Can anyone give me some pointers? Thanks!

Does this need to be tracked and stored month by month, or could you each month start all over again?

First thought is to use Database Change Triggers in the backend workflows to wait and see when a podcast episode data type is changed and in that I would set up actions to make changes to the users count and add to the existing count the total number of minutes, only if you are wanting to store the value as a field.

Learn More

Boston85719 is an expert Bubbler with a decade experience as an educator. Real name Matthew, he has been actively building SaaS apps, marketplace apps, scheduling apps and more for clients, himself and for sale as templates.

As an official Bubble Bootcamp Instructor, he leads Bubble Bootcamps on a regular basis.

Always willing to offer advice via the Bubble Forum, Matthew also offers Private Personal and Group Training Sessions.

Through his site, NoCodeTrainer, Matthew provides a range of tutorials with editor access to help you jumpstart your Bubble development.

Always accessible you can send Matthew a private message via the forum or send an email directly with your requests.

Be sure to checkout the Stripe Integration Course when you are ready to integrate Stripe payments to start monetizing your application via product sales or subscriptions.

Stripe Integration Course

Yes, in the final version of the app I’ll need to be able to store and display the data to users for previous months as well. I will explore your idea and report back. Thanks for the help!