Filtering with variables (or similar)



I’m running a project and often want to have a subset of the plan with which to sit down with the individual team members to get a view on current progress. I would like create a filter which shows tasks which have started but not yet finished.

I can create a filter which is “Planned start - is on or before - 15-Feb-17” - but every time I run the report I have to update the field in the filter.

Is there a way to have a “variable” which represents either today (the actual date today), or perhaps the project’s Current Editing Date (as set in the menu Project > Set Current Editing Date). For example I’d like to have a filter which was "Planned start - is on or before - ", or perhaps more sophisticated “Planned Start - is on before - <today + 5 days>”.

I’m not averse to writing some AppleScript to do this - but can’t see how to apply a filter.

Can anyone help?

Thanks in advance - J.


I tried typing TODAY in the filtering criterion box and it converts to today’s date but doesn’t appear to be a “variable.”

Interestingly, when I type TODAY+30 or TODAY-30 it gives unexpected results. Looks like a bug.



We do not support variable dates right now but that would be a great enhancement to add. As for “Today+30” I don’t know off hand what that parses into, but you give it a unit then you should get what you expected, such as “today+30d” or “today+1m”. These are simply shortcuts to enter a specific date.


Got it. Need the duration notation in there, d for days, m for months, y for years. I see that both “today +30d” and “now + 30d” appear to enter the same value. Time presumably isn’t supported.

Yes, a variable for today’s date would indeed be handy!



Time is supported, currently date values always have a time associated with it, it just might not be visible. You can do “now + 1h”. I don’t think there’s a way to specify +minutes though.


I see. With Column Type set to Date I iniitally couldn’t figure how (in OO5) to display the time portion of the date-time string, so I thought support must not be there. I finally figured out I could select something in the column (or the whole column), go into Selection Style in Inspector, and set the format for the column there.

A big long list plus you can roll your own under Custom Format… Very nice.



By way of comparison, Oracle’s Primavera P6 tool (Enterprise planning tool) has the following date variables:

PS = Earliest Project Start
PF = Latest Project Finish
DD = Earliest Data Date [Which is the date used for scheduling calculations]
CD = Current Date
CW = Current Week
CM = Current Month

And you can do maths - e.g. CD+4w = Current date plus 4 weeks; or PF-1mo is the project finish date minus one month.

It would certainly be great to have some or all of these in OmniPlan.



I’m not averse to writing some AppleScript to do this - but can’t see how to apply a filter.

It’s a pity OO5 doesn’t (or doesn’t yet anyway) allow scripts any access to filters.

But perhaps you can adapt one of Rob Trew’s filtering scripts posted by Mondozer in this thread.

One filters and has OO to create a separate document containing just the rows that meet your criteria.

It appears to need some changes to deal with a date column. AppleScript, of course, can automatically get today’s date-time so you could have it insert the data as a criterion for the filter (in the script, not OO).



@jsturtridge Your mention of OmniPlan, followed by a rereading of your earlier posts, makes me think you may not have meant to post in the OmniOutliner forum:)




If you are using OmniOutliner or the scripting for OmniPlan is similar enough then the following simple script may give you some ideas. It assumes Start Date is in the second column (cell 3), and the Finish Date in the third column (cell 4).

This deletes rows so first duplicate the document and run on the duplicate.


-- after deletions leaves "already started but not finished"
set todaysDate to (current date)
set startDateCol to 3
set finishDateCol to 4
tell application "OmniOutliner"
	tell front document
		set rowCount to count rows
		repeat with i from rowCount to 1 by -1 -- work bottom up
			tell row i
				set noChildren to not has subtopics
				set notYetStarted to cell 3's value > todaysDate
				set alreadyFinished to cell 4's value < todaysDate
				if noChildren and (notYetStarted or alreadyFinished) then delete it
			end tell
		end repeat
	end tell
end tell


You’re right - slip of the mouse, thank you, @SGIII ! I’ve put it into the OmniPlan section. It’s funny how alike OmniOutliner and OmniPlan are in some respects!