I have a set of tasks in a table in Glide. I used Glide tables for speed, but am wondering whether I should have used Google Sheets now…
Let’s say I have 20 tasks, and 5 of them are marked as “Recurring” using a checkbox when they are added. These will get completed during the day, but I would like them to re-appear tomorrow as uncompleted.
Basically I need the equivalent of a script that runs at say midnight and finds all rows that are Recurring=True and sets Completed=False.
Is this possible in Glide Tables, or do I need to bite the bullet and move my task data into a Google Sheet and use AppScript to achieve the above?
I think you can apply a bit of Glide computed column logic here. Try the following:
In your Tasks table, add a Date/time column. Use this column to record the last time a task was completed. So when a user completes a task, use an action to set that column to the current date/time
Add an if-then-else column:
– If Last Completed is within today, then Task Status
– If Recurring is not checked, then Task Status
You can then use your if-then-else column to show the Task Status for the current day (checked = completed, not checked = pending)
What exactly isn’t working with @Darren_Murphy’s solution? You can add multiple checks within an IF column. Can you show a screenshot of the IF column configuration? The way I’m understanding, it should work. If the task was completed today then it’s a completed task, so the status should be completed. If not, then it checks if the recurring is checked. If it’s not checked, then it’s a one-off task and should return true. Otherwise, the completed date is not today AND recurring is checked, so it should fall into the ELSE statement where you can return false.
I was working on the assumption that there is an existing boolean column that indicates task status, so I used that in the if-then-else logic. So instead of returning true/false, my logic returns the state of that column (or not). It seems to work…
If you can imagine we are looking at this as at 26 April 2023, 9:00 and I have a screen that shows my Task List that are not completed. I rely on the Completed column as a filter for this purpose.
If a task is “Recurring” and has been completed yesterday (or earlier if you haven’t accessed the app over the weekend for example) then I want it to change its “Completed” value back to FALSE if it is TRUE.
Is there any way to do this with the If->then->else function, or would I have to rely on AppScript and do this within a Google Sheet if I need it to directly update that Completed value based on the above criteria? Or is there another way that I haven’t thought of!
In pure logic terms, I need this:
If (Recurring is TRUE)
AND (Last Completed date is before today)
SET (Completed to FALSE).
What I would do is get rid of the Completed boolean column, and replace it with an if-then-else column, configured along the lines that Jeff suggested. That is:
If Last Completed is within Today, then true
If Last Completed is empty, then null
If Recurring is not checked, then true
Here is how that would look with your sample data:
Thanks, I think this works now. I am implementing it on my app and will see for sure tomorrow when hopefully my recurring task will reappear on my list as incomplete
I am updating my filter to use ifCompleted instead of Completed and will rely on the fact that the Last Completed value is populated instead of the boolean for Completed to confirm a task as “Completed”.
Have you published any apps on Glide that you have people pay for? I am wondering whether I can use Glide for this or whether it will only be just for my prototype. I would like to charge people to use the app maybe as a subscription or a one off payment, but I need to implement some sort of robust way of connecting to a user’s calendar to get part of the app to work (it brings in the next calendar appointment onto the top of the task list in my app).