I want to start using tasks in Outlook more, so I wrote a quick function to show and add tasks on my personal startpage at: www.santoroski.com.
The code is pretty basic:
Show:
<cfexchangeConnection
action=”open”
username=”academic\#user1#”
password=”#password1#”
server=”#server#”
protocol=”https”
connection=”testconn1″>
<cfexchangetask action = “get” name = “tasks” connection = “testconn1″ /><p>
<cfset count = 0>
<cfloop query=”tasks”>
<cfif #tasks.percentcompleted# neq “100.0″ and #tasks.subject# neq “”
and #tasks.UID# neq “AQQAAAAAKxAEAAAAAAAAAAAAAAAA”
and #tasks.UID# neq “AQQAAAAAKxADAAAAAAAAAAAAAAAA”>
<count = count + 1><cfoutput>
<#tasks.percentcompleted#%> <strong>#tasks.subject#</strong>
<cfif isDefined(”tasks.duedate”)>
due: #dateformat(tasks.duedate,”short”)#
</cfif>
</cfoutput>
<br>
</cfif>
</cfloop>
<cfif count gt 0>
No Tasks
</cfif>
</p>
Add:
<cfexchangeConnection
action=”open”
username=”academic\#user1#”
password=”#password1#”
server=”#server#”
protocol=”https”
connection=”testconn1″>
<cfset oneweek = dateadd(”ww”,1,now())><cfscript>
stask=StructNew();
stask.Status=”Not_Started”;
stask.DueDate=”#timeformat(now(),”Short”)# #dateformat(oneweek,”short”)#”;
stask.Subject=”#form.subject#”;
stask.PercentCompleted=0;
</cfscript>
<cfexchangetask action = “create” connection = “testconn1″
task = “#stask#”
/>
I had to do some filtering for two tasks “Complete View” and “Simple View” that Exchange must have in there by default (which is why you see the long “neq uid gobble-dee-gook. Also, I auto give a week for a due date on a new task, your preferences might vary.
My intention is to add quick things here that I need to get done, but aren’t big enough to constitute a “project.” More than 2 minute tasks, but less than 30.
Tags: coldfusion, exchange, lifehacks, Outlook, task management