Hi, I would like to add or subtract a number ...

(Duncan Higgs) #1

Hi, I would like to add or subtract a number from a value in a table based on an input from the user. I can add or subtract a constant number or expression using an action, but it seems that there is no way to allow a user to enter a value to add or subtract. In my case (personal budgeting app) I would like to be able to “transfer” a set amount from one category to another. It would be great if the user could enter how much to transfer. Is there any elegant way to do this?

(Reza Raoofi) #2

Have you tried using USERSETTINGS? You could get input from user there.

(Duncan Higgs) #3

Great! I’ll have a look into that!

(Robin Chan) #4

I made my own personal budgeting app and needed something similar. It was to calculate the cash needed to pay bills coming due in the next week based off my current balance in the bank.

What I ended up doing is making a new table with only one row with my bank balance as a column. This would be the user input.

Then I made a virtual column in that table to do the math involved to calculate the difference between that value and the list from my bills table.

The formula ended up looking something like:

[Bank balance] - Sum(Select(Bills[amount],[due date]<=today()+7))

Then I made a detail view for the bank balance table with quick edit for the value and it would automatically compute the amount needed.

My app is a bit more complicated now but I’ve attached a screenshot so you can see how it looks on mine

Hope this helps!