Page 1 of 1

Editing an existing database entry

Posted: Wed Apr 10, 2013 3:04 am
by Andrew5723708

Hello Tiggzi staff. We've got a bit of a puzzle in our group here. We're trying to figure out how to take a user's input and have it modify an existing entry in our database. As it stands we have an input titled "amount to transfer" that the user can enter an amount in. In our database we have a collection called "Account" and in it we have a field called "current balance". In this field we have say $300.00.

Here's what we want it to do:

(1) The user inputs $100 in the input box.
(2) The user hits the submit button.
(3) The field "current balance" in the database is updated to remove the $100.00.
(4) The field "current balance" in the database should now display $200.00.

We're really not sure what function of the REST API to use to get this working. Is this going to be something involving JavaScript, API services, or a combination?

Any help is appreciated!


Editing an existing database entry

Posted: Wed Apr 10, 2013 3:37 am
by Igor

Hello, Andrew

Your should use "Backend Services" and "local storage variables".

http://docs.tiggzi.com/tutorials/buil...
http://docs.tiggzi.com/tutorials/buil...

  1. get data from backend-services and save it to local-storage variables
  2. do arithmetic
  3. put data from local-storage variables to db.

Editing an existing database entry

Posted: Wed Apr 10, 2013 3:47 am
by Andrew5723708

Ok we will look into those tutorials. Thank you!