0

I am trying to list all the reminders from the app where the due date is missing but I get the above mentioned error. Any body knows how to check for a missing value in such case?

Here is the code:

set remListOut to ""
set curDate to current date

tell application "Reminders"
    activate
    repeat with theRemList in remLists
        tell list "@Call"
            set remList to (every reminder whose due date is missing value)
            repeat with theRem in remList
                log (get properties of theRem)
                set remListOut to remListOut & name of theRem & "
"
            end repeat
        end tell
    end repeat
end tell
return remListOut
RNP
  • 27
  • 6

1 Answers1

0

I regard this as a bug, the code is correct.

As a workaround use a second loop

set remListOut to ""
set curDate to current date

tell application "Reminders"
    repeat with aList in lists
        repeat with aReminder in reminders of aList
            if due date of aReminder is missing value then
                log (get properties of aReminder)
                set remListOut to remListOut & name of aReminder & return & tab & tab
            end if
        end repeat
    end repeat
end tell
return remListOut
vadian
  • 274,689
  • 30
  • 353
  • 361
  • Yes, I agree. It seems to work in the if statement but not in the 'whose' clause. – RNP Jul 03 '18 at 15:03
  • I have discovered an alternative work-around to this, BTW. You can use the due date of an existing reminder that has no due date, e.g. `set remList to (every reminder whose due date is (due date of existing_reminder_with_no_due_date))`. – hepcat72 Jul 15 '22 at 12:48