Im confused on my coding and need help

If you are going to store multiple pieces of data under user IDs in CloudDB, then you would have to either store a dictionary under each user name, or extend the CloudDB tags with JOINed suffixes, like /password, /loginHistory, /stressorList.

That would require changing the login and register code a little, in the tag generation and checking.

Also, I recommend pulling in TinyDB in every Screen, and use tag USERNAME to pass around the user name, once the user has passed login or registration.

You current scheme of passing it around at screen open block time depends on every screen doing that in all its screen opens, and would not work for screen close operations.

Pull this into every screen that needs the user name:

Okay, thank you so much i'll try it out!

So I did all of your solutions and my login/signup button work! But still lost on two things one the day tracker it marks the day as completed but doesn't add how many day ( since I login in today the days completed should have said one). Then two the stress list I dont know if it is possible to add 10 things to the list each day or unlimited amount since I want the user to go back and be able to see the list afterwards.. Sorry if my message may sound confusing. And thank for all your help already I really appreciate it.

Let's do a little data modelling.

So a user can have a list of stressors that he may or may not have on a particular day.

A user also can have a daily list of stressors that he encountered, drawn from his list of stressors.

Entering a stressor into a day marks that date as one where he has used the app (?)

Visiting the daily use screen marks the date as one he has used the app(?)

The dates should appear in chronological order when listed?

Entering a stressor into a day marks that date as one where he has used the app (?) it can but I dont believe its nessary.

Visiting the daily use screen marks the date as one he has used the app(?) Yes.

The dates should appear in chronological order when listed? Yes so it can make sense for the user.

So here's a tag/value structure that could support your requirements:
(tag:value)
<userid>/PASSWORD: the user <userID>'s password
<userID>/STRESSORS: a list of all the possible stressors a user has in mind
<userID>/yyyyMMdd/STRESSORS: a list of all the stressors that user <userID> experienced on date yyyyMMdd

I use yyyyMMdd as a date format because it naturally sorts in chronological order.

Because it is fixed in length, it should be easy to break out its 3 parts and feed them to Clock blocks that generate more customized date formats, if you want to get fancy.

The back end (database) of an app is not a place for fancy, just for things that work right.

Okay, ill see.

Destress_1 (1).aia (1014.2 KB)
So I tried that and after the user types in their feeling or what their stressing about when I click see stress list nothing is popping up

Using black ink and showing what changed in CloudDB helped:
image




Destress_11 (1).aia (1014.7 KB)

So for my relax and overcome screen i want to do the same thing I did for my stress screen but when I tried thia code again on the other screens it didn't work

So ...?

Nevermind

I can't see your blocks.

Move your head a little to the left.

So the function I have for my stress screen is the same function I want for my overcome screen and relax screen, but when I tried my same code with the stress screen, all three of the screens stopped working, so yeah.. the app below has the fixed stress screen but the other two are still a huge problem for me.
ReLeaf.aia (1014.7 KB)

Welcome back.

You did not say what you were expecting to happen versus what actually happened.

I signed back into your new app, and got the same stressors I added in my previous run, then switched to the Overcome Screen, where you go looking for another list, FEELINGS.

Because I did not add any, and because it was set to return an empty list of it found none, it returned an empty list.

But I notice you initialize global ListOfeelings to two sample values, immediately to be wiped out by the incoming empty list from CloudDB.

Were you expecting them to be returned instead of an empty list on first run?

I am in the feelings screen (Overcome), and was able to log and retrieve two feelings (gassy and sleepy)
image

I had to change ink colors to black to see them, and I had to ask for them to be displayed via the See Feelings button.

You forgot the extra cloudDB event block I had added to the stressors screen, that watches for updates to CloudDB and requests a new read, triggering a refresh of the List View on arrival.


Updating the global variable isn't enough.

You also have to update the ListView.

By the way, your Labels don't reflect what this screen covers, feelings. One of them talks about stressors.

I looked in the relaxers screen, and see you made the identical mistakes as you did in the other screens.

Now that you have two of them fixed, can you fix the third?

ReLeaf.aia (1015.1 KB)

So I believe I fixed my last screen, but a weird question: what device did you use to test out my app? I'm asking because I used my Apple phone and I think it's odd. Since one moment the code works, then i reconnet, and it stops working, weirdly enough.

I use the BlueStacks Android emulator on my desktop Windows 10 PC, for the benefits of the screen grabs and recordings.

Companion disconnects are rampant.