Is there a problem with trying to clear list?

you will have to connect to the companion app for this to work

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Sorry my mistake, I was using the build apk, I like the companion though.

This is when I first run through the app, the list in global data is empty and I'm storing the data in tinydb under the tag dad,front,10 seconds.

On the second run through the list in data is showing empty and I'm using a different tag dad, front, 30 seconds. however I'm getting the 10 second data and the 30 second data. What makes me think the global data create list is not clearing is if I build the apk and turn the app off between runs it works fine.

you might have this issue

Taifun

could be but why would it work when I come out of the app and then go back in?

do you store the new list in TinyDB after modifying it?
Taifun

yeah when the data gathering starts I use the create list to clear the old data. I store the list in the same variable that is now clear and when the data gathering has finished I store it in tinydb.

This is when I first run through the app, the list in global data is empty and I'm storing the data in tinydb under the tag dad,front,10 seconds
image
On the second run through the list in data is showing empty and I'm using a different tag dad, front, 30 seconds. however I'm getting the 10 second data and the 30 second data. What makes me think the global data create list is not clearing is if I build the apk and turn the app off between runs it works fine.

image

You are using a global variable as your tag for your TinyDB READ into your data variable.
How do you know if it is current to what you are looking for?
Could you instead rebuilt the tag on the fly and feed it directly?

I select the tag to be used at the beginning of the app and all the data for that tag is stored at the end. When I have a different tag it should pull up the data stored previously to that tag. And it works when I come out of the app between runs but not if I don't.

a short video of the app running with the device. https://www.youtube.com/watch?v=xSNyEu2Kt04

Just checking ... The bolts don't run clear thru the head, right?

Any way, so it looks like you are collecting data and graphing it on the fly.

Is there a Start button for initialization, or are you using a Screen.Initialize event for that?

The screen initializes and you select the trainee and exercise and duration which will be the tag. When you press start the objects on display turn to false and the graphing part turns to true.

more pics,image

Do you want to keep a historical record of this, or are you going to reuse that tag every time he does this exercise again?

the tag for the trainee and exercise and duration stays the same and the data gets saved in a long list of lists which I get then compare.

Your screen shot of the Do It results gets too fuzzy under magnification to read.

There is a way to prepare a sharp download, using the block level Download as PNg right click option.
Download the setTag procedure, hopefully with the comments intact, and we should be able to read all those Do It comments in our Blocks Editors.

Don't edit the .png file otherwise it will break the importability.

I don't know if this will be related to this problem...

I extracted the Do It texts from your two global variable captures into Notepad files:
tagForStart.txt (40 Bytes) data.txt (2.0 KB)

The contents of the data global variable have varied over time in content and shape.,
with identifying fields mixed in with numerical readings.

Are there multiple processes (Clock Timers, other sensors) triggering insertions of data at irregular times out of your control?

there are four clocks but there all triggered one after the other. Like I say it works when i come out and go back in which makes me think the global variable isn't really emptying.

I've turned off the autosave in the google drive still doesn't work.