Help with my Life Simulator

I am building a Life Simulator app and I need help with subtracting the money from a user. For example, they start the game with $1,000.00 “cash” and they purchase a apple that is $3.00. I need help subtracting $3.00 from their $1,000.00 “cash”.

Hi @tvmeints,

Do you have a data field for the User for cash (number)? I’d start there.

Then, when you’re substracting from the user, you’d have a workflow to make changes to current user, cash field = current users cash - X (X is the cost of the item, so for your example it would be 3).

Hope that helps,

Sorry, I was wrong. In this case it is “Money” but, is this what you mean? And also can I get a little more explanation on subtracting? The subtraction symbol will not show up for me…

Delete the Money data field you currently have.

Add a new Money data field, but this time change the data type to “number”.

Thank You so much!

Have a Wonderful Day/Night!!

I may have a few more questions here in a little!

Just a tip: I did this in a app and I created a “transaction” table also to keep transaction history for validating “payments” and it was very useful for bug fixing :slight_smile:

1 Like

If you will, can you explain how I do that. I would like to have people see their recent “purchases.”

This topic was automatically closed after 70 days. New replies are no longer allowed.