Trying to get list of my Reminders list

I’m running this script

alert(ReminderList.getAllReminderLists());

But it’s just giving me this result (see image).

I’m expecting it to return my different list. Can someone help with what I’m doing wrong?

Did you tell Drafts what you want your reminder list to be?

var list = ReminderList.findOrCreate("Groceries");
var reminders = array();
for (var reminder in list) {
    reminders.push(reminder.title);
}
alert(reminders.join("\n"));

Code untested :slight_smile:

Well I’m trying to use the new feature that I thought was to get all the list, not a specific one. So it shouldn’t be returning all the titles of specific tasks but Lists Names

That’s what I get for poking at things when not yet awake :laughing:

I’ll find my glasses and give it another go :slight_smile:

You are returning an array of Reminder List objects. I think you are after a property of each object - the title.

I think you are after something more like this.

let strOutput = "REMINDERS LIST TITLES:";
ReminderList.getAllReminderLists().forEach(function(objList)
{
	strOutput += "\n" + objList.title;
});
alert(strOutput);
2 Likes

Yeah that does it. And I never would have gotten there. Thanks!

1 Like