How to move to the next item/day in a database

Hi! I currently have a task list that checks if the items listed have been completed in their entirety. I also have a text component above that currently displays the task list day. (ex. Day 1) that populates from my database based upon the user and their progress. How can I get the text component (Day 1) to change to the next day (Day 2) from the database once I click a Submit button? Thanks!

In short, I guess I’m asking, how can I change and update an item in my database to reflect the next day?

Umm, this will depend a lot on your data structure really :thinking: For that you need to evaluate whether you will create a data table of dates or tasks. I would probably go with tasks, but then it would be important that your database would allow querying with a limit on the date, so you can ask for the tasks of the day etc…

Aside from that, you can find our date formula functions here. You will need to use formulas to increment the date to get it right, e.g. ADD_DURATION.

Thanks @Mevi

I have attached my Tasks table below.

Currently, I have a submit button that validates if both boxes are checked. If not, I throw an alert message.

Also, where highlighted I populate the “Day 1” from an app variable.

The app variable is set during the user Log In

And the value comes from the TaskDay field in the motivation table

I would like the motivation_id to change to Day 2 in the user table when the Submit button is clicked properly.

I’m currently stuck here. Can you provide any assistance? Thank you!

Ah so it’s not a date-type field at all, but a String/text type. I recommend to just switch the TaskDay to a number type field, so it would just be 1, 2, 3, etc. You can add the “Day” text to it in Composer where needed. When it’s a number type field, it’s easy to update it to be +1.

Hi @Mevi
I have a MOTIVATION table where I have a text type named TaskDay.

I also have a USER table with the motivation_id represented as an integer in my database where I retrieve the TaskDay based on the users Login.


Currently I have an APP VARIABLE named TaskDay set with a text value

My Text field gets its value from there.

I set the TaskDay app variable at Login and Get Record from another node using _user_motivation.TaskDay

I’m not trying to increment the actual number only, I would like to change the motivation_id in the USER table to the next TaskDay ID (Day 2 #2).

Only because I have a motivational quote associated with each TaskDay that gets referenced elsewhere in my app.

When all checkboxes are checked and the Submit button is clicked that is when I expect the change. As shown with the If condition formula below:

If condition
((data.Tasks1[0].CheckedTask) && (data.Tasks1[1].CheckedTask))

Any idea how I could accomplish this? Thanks!