All,
So I was able to get things done the way I wanted without any help on my post.
A few questions to the user or administrators on this forum:
When I want to look at my Inbox and only return context of office, what is the syntax for that?
Here is what I have now, can someone help me make it work? I am trying to set a variable called office to context office then just return the values. I may be way off and I think I am...
Code:
set office to first flattened context where name is "Office"
set refHistory to a reference to (flattened tasks where (in inbox = true and its completion date > dteHistory))
set refFuture to a reference to (flattened tasks where (in inbox = true) ¬
and (due date > dteFuture2) and (due date < dteFuture))
#set refPastdue to a reference to (flattened tasks where (in inbox = true and its due date < dtePastdue))
-- Get the data I want to display for a email to be used later. Would like to understand how to format better.
set {lstHDate, lstName, lstNote} to {completion date, name, note} of refHistory
repeat with i from 1 to length of lstHDate
set dte to item i of lstHDate
set item i of lstHDate to ((dte - pdteBase) as string) & tab & short date string of dte & tab & item i of lstName --& tab & item i of lstNote
end repeat