Go to Selected Item

Can someone please help me with a simple script? The goal is to remove the filter and navigate to the selected item’s location in the hierarchy. Here are the steps:

  1. Focus the selected item.
  2. If a filter is currently active, remove the filter.
  3. Unfocus

Hi,

Focus is clear. What do you mean by filter? A selected folder or project in projects perspective? Then remove the focus again?

Could you please be more specific about what your issue and the the intention by this is?

When a filter is applied in the sidebar and you have a row selected in the main window, when you remove the filter, the selected row is lost. I’m trying to preserve the selection after removing the filter. After some experimenting, I found that I could accomplish this by following the three steps I listed in original post.

  1. Focus the selected item
  2. Clear any applied filters. Since the selected row was focused, it will still be selected and focused after removing the filter.
  3. Unfocus. Now you have the full hierarchy with the selected row still selected.

Therefore, I’m looking for a one-click approach to this.

That is not available in scripting dictionary. You would need to traverse System Events GUI object hierarchy and code it by hand. Certainly not a trivial thing to do.

May be let’s talk about the desired interaction with OF. Do you just want to select an element in the sidebar and see more than the element and the items it contains in the outline?

The desired interaction is to be able to view the children of a filtered item. OO shows the parent items in the hierarchy, but not the children. To view the children, you must remove the filter. However, when you remove the filter, your position in the outline is lost. Thus, you have to scroll through the outline to find the previously selected node. This is not an efficient workflow.

As I mentioned previously, my current workaround is:

  1. Focus the selected item
  2. Clear any applied filters. Since the selected row was focused, it will still be selected and focused after removing the filter.
  3. Unfocus. Now you have the full hierarchy with the selected row still selected.

I’m trying to find a way to accomplish these three steps in one click, or some other approach to exposing the children of a filtered item.

Just wanted to start working on a solution to the topic. Then noticed you are referring to OmniOutliner. I‘m getting old. No wonder I didn‘t get your issue.
I‘m really sorry for giving you false hope, but I don‘t have access to OmniOutliner at all. Was always thinking of OmniFocus.
@Sal: Are you able to do something for him?

Greetings! So the steps you wish to automate would be:

  1. Focus the selected item
  2. Clear any applied filters. Since the selected row was focused, it will still be selected and focused after removing the filter.
  3. Unfocus. Now you have the full hierarchy with the selected row still selected.

Not sure about access to filters. Let me investigate…

1 Like

@Sal You‘re the best. Always there for us.