# Adding a field for calculated output on a form

I watched a video about using Maths and Custom formulas with Adalo. In the video it seems like the presenter has a form which contains input fields for the user to input numbers and then output fields where the user is using a custom formla that takes a number from the database and then adds the tip amount that was entered by the user.

I cannot figure out how to add the field that displays the output on the same form that I am is accepting user input. It seems like the only way to have access to user input to use it within the same form in which it was entered in. Is there a more detailed video which shows the process of builidng an app which uses math from start to finish just so I can learn the entire process?

If you take whatever collection the output belongs to, make a list of that collection with just the output field (it can be a list of 1 item) then you make that list auto refresh.

Have the user put in their inputs and then press a button to calculate the output (most likely the button will update the collection) then the list should show the calculation.

Thank you again Bobby for replying to my question.

What I am trying to do is build a mortgage loan payment calculator. The way it works is it asks the user to enter the loan amount and the interest rate.

Then I created a separate collection of interest rates going from 1% up to 10%. For each rate I have a factor that is equal to the number you multiply times the number of thousands in your loan so for example if the user entered loan amount \$100,000 at 6.0% the monthly payment would be 6.0(coincidentally 6 happens to be the factor for 6%) * 100 (100,000/1000) =\$600.

So I have 3 collections: Users, Loans, and Interest Rates
I have a relationship between Users and Loans where 1 user can have multiple loans and I have a relationship between loans and interest rates where 1 interest rate can be associated with multiple loans.

So I tried to build a form where I ask the user to enter their loan amount and their interest rate. And then I am trying to take that rate that they entered and somehow match it to the factor that corresponds in the interest rate collection and multiply that number times the entered loan amount divided by 1000 and to output that resultant number to a new custom list. But it seems like I am missing a few steps because it doesn’t seem as if there is a connection between the entered rate and its corresponding factor in the interest rate collection and it doesn’t seem as though I can use any of the values that are in my input form in the calculations that are going in my custom list.

It seemed like in your previous reply you were telling me that I need to somehow make the calculted loan amount part of a 4th collection and display that in the custom list. Is that correct or am I an the wrong track there?

Ah, I see.

Yeah the math on that one is pretty advanced. I don’t remember the whole mortgage calculation, but I remember it’s pretty complex.