Referencing a balance (user and business)

I’ve created a database called “Balances” that links to a user, links to a business and holds a numeric value. When the user clicks on that businesses page within the app, I would like it to display their balance. However, I’m having trouble being able to call that specific balance, let alone allow the user to update it.

In the template I’m working off, it should function like a food order (linked to a business and a user, holds a numeric value).

Thanks for your input!

I’m assuming that there is a one-to-many relationship between businesses and balances. A business can have many balances and balances belong to one business.
I’m also assuming there is a one-to-many relationship between user and balances. A user can have many balances but a balance belongs to one user.
Correct me if I’m wrong here.

You would add a text component to display the number value and add magic text.
Current Business > Balances > Amount > Sum with a filter Current Balance > User > email > is equal to > Logged in user > email.

Like this:

Now, in order to update that balance… You need to make a list of balances and filter. So for this example, I created a number parameter on the Business collection and called it “Business ID#”. Each business should have its own unique business ID number.

Drop in a button that links to the “Edit Balance” screen. Create a list from this button of Balances with the “Logged-in user> Balances” primary filter. Add another filter where “Current Balance > Business > Business ID# > is equal to Current Business > Business ID#”. Then, set the maximum items to 1.

This will send the current balance and the current business to the next screen where the user can update their balance.