Dynamic Component and Dates

Good morning Kodulers
I’ve been in the Community but no post has helped me.
I have this app with this screen.
They are menus and submenus made with the extension of dynamic components.

When the user chooses a date, I would like the submenus below to show the dates in the sequence of days until the list is finished.
But the dates are appearing all the same. How do I solve this?

I’ve used the clock component blocks, but it didn’t work either.

Try something like this, modify code according to your needs

6 Likes

Thanks a lot for the help @dora_paz

Yes, these blocks of yours helped me a lot. But I still have some points.

  1. From one menu to another, the date is restarted. I would like it to continue from one menu to the next.


You can just store the latest date in a variable and continue it.

1 Like

As @WatermelonIce suggested save latest date to tinydb.

1 Like

I just stop with a question that is:
Why create a variable for the last date, if I’m using this logic inside the block?

Screenshot_1

Look

Wasn’t the logic of the blocks for the sequential date to go to the end of the list?

Yes, but as you said you need to continue it.

If you want to do that;
Put the for loop away from the procedure and use the loop when running the procedure. Assign the last number + 1

In the place where you want to create the second set of dates, run the procedure again the for loop. But the from parameter should be the number you’ve just assigned.

1 Like

Thanks @WatermelonIce, for helping with your tips. Your tips and help were very helpful.
But I still have the same problem.
Could anyone try to help me?

1 Like

I am already working on it but because the code is a bit messy and I need to translate it to English :sweat_smile: So if you can wait for a bit more, it would be great!

1 Like

Laughs…
I’m new to programming … but I’m learning a lot from you.

Ok … I will wait.
Excuse me.

1 Like

Note
:sleepy:

Sorry I have completely forgot about it :frowning:
I will do it as quick as possible.

1 Like

No problem, my friend.
I really need this solution a lot.

1 Like

@Douglas_Maueski try this and see if it works

AppLeituraTESTEMASTER1_4.aia (163.4 KB)

2 Likes

Hello Friend @dora_paz

I’ve done the test here and it worked now. Thank you very much for your help, and for taking the time to help me. :star_struck: :wink: :grinning:

And also thanks @WatermelonIce for helping too.

2 Likes

Application Screen

When I restart the application

Relevant Blocks

Screenshot_2

When choosing the date, in the list below it is informed in the sequence of +1 day for each item in the list.
But it happens that when I restart the application the date of the items in the list appears the current date of the cell phone. How do I always get the date stored in TinyDB?
I know I need to use the TinyDB.Get Value block, but I don’t know where to put it. :unamused:
Note: I tested the .Get block in several places, but without success.

Could you help me please? :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.