Only include relevant tags in perspectives

@MultiDim The problem with this is that there are frequently tasks that have more than one tag as I want to see them in more than one task list (perspective). e.g. I might have a task that is tagged both ‘Morning Ritual’ and ‘Bedtime Ritual’ so that if I do not get to it in the morning, it also appears in my bedtime ritual. I’ve tried pretty much every other way of organizing things, and there is really no other way to achieve this except with tags, only they don’t work as you would expect.

Re-reading my answer from a year ago, I realise I could have been clearer.

Keep your tagging system so that tasks can have multiple categories. You’d have a perspective for Morning which filters on the ‘Morning Ritual’ tag, and groups results by nothing (or a field other than tags); and another perspective for Bedtime. The only limitation is that you wouldn’t see tasks grouped according to a different tag categorisation than ritual time-of-day (eg. location: kitchen, computer, …).

Yes, this was a very delayed response! I had intended to respond when you first replied. I knew that it didn’t work but I couldn’t remember exactly why as I had tried so many different ways of doing it. I happened on this thread again and thought I would just make clear that this had not solved it. :)

The issue with grouping actions as ‘Ungrouped’ is that it no longer allows me to sort by ‘Tags Order’ which is the only way I have found that lets me manually re-order the tasks in the Perspective without inadvertently interfering with the task order of the other Perspectives.

I actually have four daily ritual perspectives. ‘Morning’, ‘Afternoon’ (done immediately after lunch), ‘Evening’ (done at around 5:30pm at the end of the work day) and ‘Bedtime’ (done while winding down for bed). All these rituals have tasks in them to help keep me on top of my routine tasks, and many have tasks that show-up in more than one list in case I miss them earlier in the day. Add to this, that I also have variants of these for Vacations and Business Travel, which adds up to a lot of potential clutter, if the Perspective won’t zero in on the precise tag or tags while hiding all the irrelevant ones.

If you set up one perspective for each of your 6 rituals, which filters on the corresponding tag, then you have dealt with showing only the relevant actions in each part of your day (including any actions you didn’t do earlier and which are tagged for several rituals).

Then it’s a question of how to group these relevant actions.

  • Ungrouped: no need to expand any groups on iOS, but you won’t be able to have different action orders for each ritual.
  • By tag: able to order actions under each ritual tag group, but actions appear under multiple tag groups.
  • By ‘Tags (Combined)’: each action appears only once, and you’ll get tidy groupings if your tag hierarchy is set up well, but you won’t be able to have different action orders for each ritual.

Setting up one perspective per ritual open ups interesting workflow possibilities. You could for example have iOS Shortcuts automatically display the relevant perspective based on time and/or other events.

Thank you for trying to help, but as I tried to make clear above, the only viable grouping that I can use is by tag. This is because it is the only one that lets me manually organise the tasks into the order I want for each Perspective, without affecting the order of the other Perspectives. As you have pointed out, you then end of with all the tag groups displayed which is precisely the problem I have been trying to explain - the tag groups included are not just the one or two tags I want to see. e.g. For my morning ritual I want it to show tasks tagged ‘Ritual (Urgent!)’ which is for really important tasks that I must not forget, and ‘Ritual (Morning)’ for all the tasks I want to appear in my morning ritual. The problem is that I also end up seeing all these additional tag groups which I did not want, as these are also tags that the included tasks have been tagged with.

Regarding your other point, I am really interested about how to have an iOS shortcut show a diferent Perspective based on time of day. That would be so useful. How can I set this up? Is there any documentation?

Re: Perspectives for time of day - have you considered iOS 14 widgets?

If you have (say) Morning, Day, Evening perspectives you could have them in a widget stack and just swipe to the one you want. Not automatic, but certainly quick.

1 Like

The simplest way would be to use the ‘Automation’ tab of the Shortcuts app which provides triggers: at a specific time, show a specific OF perspective. Recently used perspectives will show up as OF actions (which open them) inside Shortcuts. This is not very flexible since it will interrupt you at a fixed time.

Instead I would look at creating a single standard shortcut which would get the current time and, based on threshold times, would display the corresponding ritual perspective (using a series of nested ‘If’ actions). This shortcut can then be run in all the ways iOS provides. Apple has provided good documentation on Shortcuts: [Shortcuts User Guide - Apple Support].

Just a thought, maybe approach it from a different angle… have perspectives based on morning only, afternoon only and anytime (or some derivation of)

To make this work you only need three tags morning, afternoon and anytime. If something is critical add a “urgent “ tag to it that way grouping by tags combined should surface urgent tasks first.

To me if your tagging something morning but sometimes missing it and doing it in the evening it’s not really a morning task but an anytime task. You could also either have an urgent perspective or use urgent as the forecast tag as a further level of checking when winding up every day

This is really analogous to device tagging, laptop, phone, iPad any device etc.

Ok that may help it may not just a different take. Sometimes if you can’t make the system fit you then you have to perhaps rethink things and fit the system instead.

AlsoI keep all my routine tasks in a separate folder (as I do with admin tasks as well) with single action lists for different areas, tech routine, business routine, tech admin etc that way you can focus a perspective on one folder or folders.

I think I got this right, and it will need some editing, but essentially, this shortcut when run will show one perspective in OF if it’s after 6:00pm (so, an evening tag, let’s say), another if it’s before noon (like a morning tag), and yet another if neither (meaning between noon and 6pm, or afternoon).

Hope this is a useful Shortcut!

ScottyJ

2 Likes

I only just saw your post yesterday but thanks a lot for this. I have used yours as a starting point and made my own variant. My main change was to have it measure the time forwards from the morning which I just found easier when working out the changeover times. It works great.

In case anyone else is interested here is my ‘OmniFocus Now’ Shortcut.

I’m also looking forward to when we can create Perspectives that displays/groups only by the tags we’ve selected. It’s good to hear that it’s something on Omni’s radar.

I also wanted to comment on @saltedlolly’s issue with morning, afternoon, evening and bedtime rituals. My take on that was slightly different - I utilise the “defer” field. Morning items show up at 8am, afternoon items are assigned a defer time of 12pm etc.
I’ve created some automation scripts and added them to the top of the toolbar - “Defer - Morning”, “Defer - Afternoon” etc. It pushes out the defer date to the next day’s “morning”, “afternoon” etc. So that if I don’t end up doing the task, they would show up for the next day’s routine.

By doing it that way, I just have two Perspectives, “Urgent” and “Not Urgent” and the defer time would surface the items at the relevant times. If I miss something in the morning routine, it would still be in the “Urgent” perspective when I go check it in the afternoon. If I can’t complete it still, I push the “Defer - Morning” button and it’ll show up the next day at 8 am.
If they are repeating items to begin with, I set the defer time to the appropriate timeslot and make it “Repeat from the item’s Assigned Dates”. Then I just mark the item as completed even if I didn’t manage to do it that day - the item will pop back up the next day anyway.

1 Like

Did this ever get built?

Here we are in 2024, and this is still an annoyance. I’m running OF 4 Pro.

I assume this discussion applies to custom Perspectives where the Structure is set to ‘Organized’, ‘Organize Individual Actions’, and ‘Group actions by’ is set to ‘Tag’?

To solve the problem of extraneous tags being displayed, I’ve written this Applescript, so Mac only (I run a variation of it from Keyboard Maestro)…

tell application "OmniFocus"
	tell default document
		set target_tag to first flattened tag whose name is "Communications"
	end tell
	
	tell front window
		set perspective name to "Communications" # optional, this line moves OF to a custom Perspective with the same name.
		set selected trees of sidebar to target_tag # doesn’t matter whether the sidebar is visible
	end tell
end tell

Adjust the Tag and Perspective names to suit your own setup.

I’m not sure if this can be done in javascript, but this scratches the itch for me for now.

How would a result look like? (Don’t have a Mac.)

All that this is doing is (semi-automatically) stopping the re-listing (by default) of the same items under all the ‘other’ tags applied to them. I find that visually cluttered and distracting in certain Perspectives that I want to be focussed on a single tag, which I believe the original grievance at the top of this thread?


Hi,
anyone interested in a plugin or a Apple Shortcuts version of the @RobertBlack AppleScript?

This is, what today what seems to be the only solution after @RobertBlack explained to me what‘s desired.

Example screenshot:

There are two implementations that allow using either the built-in Tags perspective or a custom perspective that follows these conditions:

Structure = Organized
Organize = Individual Actions
Group actions by = Tag

BTW: You should not exclude the tags you want to see in the custom perspective‘s rules.

I‘ve made a plugin that you can use on Mac, iPad and a Apple Shortcut that is probably more helpful to call the perspective on an iPhone. All should work on all devices.

You have to adapt the code to your specific needs. Two options exist for this.
In plugin and Apple Shortcut you need to specify OPTION 1 in the code (see comments) if you want to display a custom perspective or the built-in tags perspective. The Tags perspective is already enabled, If you want to use a custom perspective, then remove the // at the bold line displayed below in the code.

// OPTION 1: Decide which type of perspective to use

// A: The built-in Projects perspective
// CODE A:
var perspective = Perspective.BuiltIn.Tags;
// B: Either a custom perspective that uses…
// Structure = Organized; Organize = Individual Actions; Group actions by = Tag
// CODE B: uncomment the following line to use a custom perspective
// var perspective = Perspective.Custom.byName(“My Custom Perspective”);

Additionally, you have to specify under OPTION 2 the tags you want to have displayed (see comments in the code as well). You would have to replace the bold text below in the code with your tag names.

// OPTION 2: Define the visible tag names you want to see; here in the example tags Morning and Evening
var targetTagNames = [“Morning”, “Evening”];

Here‘s the plugin as well as the Apple Shortcut for download. Both implementations have no dependencies to each other.

OpenPerspectiveWithTags.omnifocusjs (1.4 KB)

https://www.icloud.com/shortcuts/2448d4de5a2c4c71b492ef33be1992ab

I hope my explanations are good enough for you to understand. If not, then get back to me.

Hope that helps anybody out there.

Edit: Added a comma.

1 Like

That’s brilliant Logan! It works for me. I did not expect that this could be fully cross-platform.

And can I just acknowledge, how fantastic it is that the Omni Group has made their apps so customizable via scripting that fixes to minor and niche annoyances like this can be done by end users!!

Here’s how I’m using your shortcut. I call it from another repeating task in my daily review by tapping a Shortcuts URL…

Then I’ve added steps to split the screen if it’s run on an iPad, putting the new tag-focussed window on the right side…

This way I don’t lose the context of my daily review checklist in the left window. I am very happy with this update to my daily review workflow on the iPad Logan!

1 Like

@timstringer If what I posted earlier is something for your LearnOmniFocus audience, then feel free to offer it on your site.