I’m trying to do an automation based on a button in a table of tasks. The automation side is very simple as all the conditions are put into the button. So the automations just run everyday at a certain time. So I want the button to change the status of the task to overdue if today > due date, and also if not task is not marked as completed. The modifying of status part works fine, but the notification part has some problems. It notifies me of all the tasks in the table when i run the automation, instead of the 1 or 2 that are overdue. How should i make it such that it only notifies me for those tasks that are overdue?
Hi again @yscias , you cannot put the runactions inside an if statement, because the “if” is static, while you want it to apply to each of your row
You need to go through each row of your task list, and check
Try something like that (Table 13 is your task table)
ForEach(
Table13
.Filter(
DueDate < Today() AND Status != "Completed"
),
RunActions(
Notify(
CurrentValue.assigne, Concatenate("Overdue :",CurrentValue.Name)
),
ModifyRows(CurrentValue,Status,"Overdue"))
)
The first parameter of ForEach() define in what part of your table you want to check, here you go your filter to run only in your interesting tasks, the second parameter is the RunActions() with your both action. Then rather than using thisRow, you use CurrentValue