Hi.
This is an old post but I use something to refresh my to-do's.
I put a timer somewhere in the page and set its time to 10s, and Visible property to false.
In the OnTimerEnd property I set the variables I need from my to-do list. For me I needed the quantity of tasks and the list of to-do's and since I needed them on multiple pages, I used the Set() function :
Set(
AlarmesNbre;
CountRows(
'MicrosoftTo-Do(usageprofessionnel)'.ListToDosByFolder(
LookUp(
'MicrosoftTo-Do(usageprofessionnel)'.GetAllTodoListsV2();
displayName = "Alarmes";
id //This is the list id to sort only the task in "Alarmes" list
)
)
)
);;
Set(
AlarmsList;
'MicrosoftTo-Do(usageprofessionnel)'.ListToDosByFolder(
LookUp(
'MicrosoftTo-Do(usageprofessionnel)'.GetAllTodoListsV2();
displayName = "Alarmes";
id //This is the list id to sort only the task in "Alarmes" list
)
)
)
Then I use "AlarmesNbre" in labels to display the quantity of task, and adjust icon's color. I use "AlarmesList" in galleries.
Since all data are transfered to the variable, you can use a button inside a galley to delete or update a task, and use the "id" to modify the proper task :
'MicrosoftTo-Do(usageprofessionnel)'.DeleteToDoV2(
LookUp(
'MicrosoftTo-Do(usageprofessionnel)'.GetAllTodoListsV2();
displayName = "Alarmes";
id //This is the list id, required by the Delete function
);
ThisItem.id //This is the task id, same as passed within the Set() function
);;
UpdateContext({AlarmesVar: false})
Not sure if this is a proper usage but it seems to works.
Thank you.