1. RyanLHagen's Avatar
    I have been learning to use Fusion Tables with App Inventor and have made pretty good headway, but I've been stuck on the same issue for the last few days. The function I am working on is a counter.

    What I have achieved so far:
    When button is clicked:
    1) a global variable of 1 increment is added to the total count global variable
    2) The new total is inserted into a new row in my fusion table under the column "CigTotal" (it's a cigarette counter)
    3) The date and time of the event is inserted into that same row in the column "Date"

    The problem:
    When the app shuts down, I lose my total count and start over from zero. I want to be able to query the fusion table when the screen initializes to retrieve the latest total, use it to set the global variable total, and then continue to add to it. For reasons too long to go into (relating to the app's intended use), TinyDB and TinyWebDB would not be appropriate in this case. I'm assuming my answer lies somewhere in establishing a specific row/column which would be updated/overwritten, and drawn from during initialization. Basically, I need a way to tell the app to add to the value of a specific cell, which would be the same exact cell every time, and get the value of that same cell on initialization (whatever it may be at any given point in time). I attached a .png image of my screen set up, block set up and how it looks in the fusion table as of now.

    I would greatly appreciate any suggestions or advice you could offer for achieving this. Thanks, RyanLee
    06-03-2011 03:53 PM