Jump to content

Easiest way to search within a tag?


Recommended Posts

41 minutos atrás, kevinplarson disse:

I know this is a very basic question, but it seems like the search function is changed.

How do I search within a tag for keywords in the easiest way?

I did not understand your question. Can you give an example?

Link to comment

EN have decided that you cannot filter by tag first and then search the filtered results. It used to work in V10 but they changed it.  The only solution is to use the advanced search syntax as outlined by @Boot17 above. Please make sure you feedback directly to EN that this restriction is ridiculous. I have an outstanding support request from months ago.

It's been mentioned before. See for example

 

  • Like 1
  • Thanks 1
Link to comment

Just to be absolutely crystal clear about the process:

1. Filter by tag (I have 903 notes tagged with R which is correct)

image.png.0b7048c8e3c471fa9ad2a9a0df18c77b.png

 

2. Add a search term to the search box and press enter. The screen flashes as if the search has been executed but nothing has actually changed. Even if EN want us to search and then filter this must be a bug. The cross at the end of search field seems to suggest that the search term has been included in the search - but it hasn't been.

image.png.b6e8a11f413a73d432fce6c3a6e50b3d.png

 

3. Click in the search box and hit enter again. Now you get the search but the tag filter is removed

image.png.eaab971008e159c3e341f6e2e94325e0.png

 

If you search and then filter or use the advanced search syntax you get the correct result (272 notes):

image.png.2e9db9001d3d98b9824104a0c93c0a74.png

OR

image.png.5ae83740417dc80c230b49b8507489fb.png

 

Notice that my 2nd and 4th screen shots look  the same but have different number of results.

  • Like 2
  • Thanks 1
Link to comment
5 hours ago, Mike P said:

Just to be absolutely crystal clear about the process:

1. Filter by tag (I have 903 notes tagged with R which is correct)

image.png.0b7048c8e3c471fa9ad2a9a0df18c77b.png

 

2. Add a search term to the search box and press enter. The screen flashes as if the search has been executed but nothing has actually changed. Even if EN want us to search and then filter this must be a bug. The cross at the end of search field seems to suggest that the search term has been included in the search - but it hasn't been.

image.png.b6e8a11f413a73d432fce6c3a6e50b3d.png

 

3. Click in the search box and hit enter again. Now you get the search but the tag filter is removed

image.png.eaab971008e159c3e341f6e2e94325e0.png

 

If you search and then filter or use the advanced search syntax you get the correct result (272 notes):

image.png.2e9db9001d3d98b9824104a0c93c0a74.png

OR

image.png.5ae83740417dc80c230b49b8507489fb.png

 

Notice that my 2nd and 4th screen shots look  the same but have different number of results.

Yes, you're describing the problem I'm having! So I'm not crazy. 

 

so... if I want to search a TAG and a KEYWORD in the tag, what's the exact command? thanks

Link to comment
9 minutes ago, kevinplarson said:

Yes, you're describing the problem I'm having! So I'm not crazy. 

 

so... if I want to search a TAG and a KEYWORD in the tag, what's the exact command? thanks

If your tag is called janet and the key word is john then the search is

tag:janet john

It can be any order and you can edit it as you go along. So for example you could progress as follows

tag:janet                            # notes tagged with janet

tag:janet john                       # notes tagged with janet containing the word john

john any: tag:janet tag:edward       # notes containing the word john and tagged with either janet or edward.

intitle:john any: tag:janet tag:edward       # notes containing the word john in the title and tagged with either janet or edward.

 

Link to comment
2 hours ago, kevinplarson said:

I'd think EN could find an easier way than these power commands, though.

Agreed  -and it used to work fine. 

I now have an Autohotkey script that will add any tag to the search when I hover over it in the sidebar and press a certain key combination. For me this solves not only this problem but the inability to add a second tag to the filter from the sidebar (shift+click in legacy)

Link to comment
25 minutes ago, Mike P said:

Agreed  -and it used to work fine. 

I now have an Autohotkey script that will add any tag to the search when I hover over it in the sidebar and press a certain key combination. For me this solves not only this problem but the inability to add a second tag to the filter from the sidebar (shift+click in legacy)

Mike,

could you please share that script? I am using Autohotkey with EN, too.

In legacy, it was to automate a number of workflows (such as: assign the title of the note to the PDF file in it (i.e. rename that file)) with one keystroke.

In V10 many of those scripts do not work, because the whole of EN is now essentially a single browser window, so one can not detect sub-windows that pop up. 

Thanks.

Link to comment
1 hour ago, Razmataz said:

could you please share that script?

Its AHK v2. I would emphasise that I am not an AHK expert so I might not have written the most elegant code but it works. The lengthy sleeps are becasue the interface is just so slow! It relies on the fact that if you rename a tag from the sidebar you get a text box containing the tag name which is copyable.

You need to hover over the tag  and then hit the hot key (ctrl+shift+a in my case).

If you repeat the process it will add the new tag to the search.

I suggest you step through the process manually, so you understand exactly what it is doing, before you start using it with AHK. 

Hope it works for you

 

^+a::
{
	SetKeyDelay 100
	Send "{Click Right}"
	Sleep 200
	SendEvent "r{Enter}"
	sendEvent "^c"
	Sleep 200
	sendEvent "{Tab}{Enter}"
	Sleep 500
	sendEvent "!^f"
	SendEvent " tag:^v{Enter}"
}

 

Link to comment

Thanks Mike,

I understand what you are doing. Let me play with it. I am not using AHK V2 yet, but this script is straightforward and should work under V1, too.

Thank you.

  • Like 1
Link to comment

@Razmataz Here's a bonus script! I like the ability to filter based on a tag in a note

image.png.f058868bff761370a8b9424d65d9f3ff.png

This resets any search or filter already in place which is often fine. However sometimes I want to add the tag filter to my existing search/filter without having to go and find the tag in the filter menu.  If you click on a tag in a note and then run this script (ctrl+shift+b) it adds tag:tag_name to the search bar and then runs the modified search. 

Because of the current restriction on filtering and then searching you might need to convert a filter into a search first. Because 99% of my filters are just for tags the following sequence works for me

  1. Run the script on the tag which is currently being used in the filter
  2. Delete the filter (blue lozenge) as this is now duplicated by the search string
  3. Run the script on the tag you want to add to the filter

Obviously the best thing at the moment, for maximum flexibility, is never filter - always use the advanced search syntax.

^+b::
{
	SetKeyDelay 60
	sendEvent "^c"
	Sleep 500
	sendEvent "!^f"
	SendEvent " tag:^v{Enter}"
}

 

 

  • Thanks 1
Link to comment
  • Level 5

It is, imho, unfortunate the "legacy" way of simply picking the tag you know the note(s) you want to work with are in, then (in case there are lots of other notes also using that tag) typing in search text and having the list shortened to just those notes in that tag that have that search text is no longer the way it works. That was clean, efficient, logical and precise. 

Progress, eh? 

  • Like 2
Link to comment

I suffer from this "effect", too. The old way is just too deep inside.

And it was a very efficient and therefore productive way. But productivity and efficiency are not among the objectives of V10. Almost everything needs more clicking, more thought about the context etc. This slows me down considerably.

Unfortunately, here in the forum it is easy to get heat from the V10 enthusiast ("there is a workaround", "I don't need it", "I use the *** tool for that" type of answers).

But there is one thing you can do, just like myself: give feedback: https://help.evernote.com/hc/en-us/requests/new

EN doesn't seem to care much, but at least it is documented and the users (us!) cannot be blamed for not having expressed dissatisfaction.

So, go ahead and give feedback, please. Thanks.

  • Like 1
Link to comment
47 minutos atrás, Razmataz disse:

 

Unfortunately, here in the forum it is easy to get heat from the V10 enthusiast ("there is a workaround", "I don't need it", "I use the *** tool for that" type of answers).

But there is one thing you can do, just like myself: give feedback: https://help.evernote.com/hc/en-us/requests/new

 

 

I don't know why you said "Unfortunately". All the options you listed are valid tips including giving feedback. In the end, that's all we here on the forum can do. We are just users. It's up to us to just try to find alternatives, complain and hope that Evernote listens to us. Just it.

  • Like 1
Link to comment

My point is: we should acknowledge, clearly state and report the issues and not down-talk them ourselves. Otherwise EN might think it is all fine and dandy.

But I do understand the possibilities and limitations of this forum. 

PS: "I don't need it" is not a helpful or "valid tip", though.

YMMV.

  • Like 3
Link to comment

As I've noted elsewhere it is possible to "convert" the filter to a "search" by  pressing force reload (ctrl+shift+R). (If it doesn't work first time try it again). To me this means that this is definitely a bug and not a concious decision to prevent a "tag then search" workflow. The tag should be added to the search but for some reason it isn't unless you reload. Now we need somebody at EN to actually deliver on the promise to work on all the bugs in 2024 (You're already had a quarter of 2024 EN and I am still affected by just as many bugs).

 

  • Thanks 2
Link to comment
1 hora atrás, Mike P disse:

As I've noted elsewhere it is possible to "convert" the filter to a "search" by  pressing force reload (ctrl+shift+R). (If it doesn't work first time try it again). To me this means that this is definitely a bug and not a concious decision to prevent a "tag then search" workflow. The tag should be added to the search but for some reason it isn't unless you reload.

I tested it here and it really worked! The tag I had filtered before appeared below the search field! Thanks for the tip! 

  • Like 1
Link to comment
  • 3 weeks later...

I'm seeing a slightly different behaviour today (Windows 10.84.3)

If I filter by a tag and then search, nothing happens but the filter is "moved across" to be under the search input. I don't think this reliably happened before. As explained above this is the key to being able to use the search. Subsequent searches then work as expected. This is a much better alternative to a reload (which often removes the filter and always destroys my nicely filtered task list). I also noticed that changing the tag filter to "include sub tags" from the drop down in the blue tag filter lozenge and then back again if required also works.

Link to comment
52 minutes ago, Mike P said:

I'm seeing a slightly different behaviour today (Windows 10.84.3)

Closed EN and reopened and the behaviour is back to normal - searching does nothing and then clers the filter if you try again. However the "include sub tags" hack is still working

Link to comment
  • 2 weeks later...

I've found that using advanced search with a tag plus a word works well enough for me, BUT the tag has to be a single word!  I guess with multiple words its little brain gets scrambled and doesn't recognize that the multiple words are a tag. 

A multi-word tag works perfectly well in other settings -- you can use it as a filter or in advanced search -- but it doesn't play well with others..

I'm a lawyer and use tags to identify broad subjects for quotations from cases etc.  I have a tag called Statements of Decision, which combined with a word returned zero results.  But when I renamed the tag to StatementsOfDecision (it doesn't have to have capitals), it worked fine.

Example:  tag:Statements of Decision interrogatories -- no results

But:  tag:statementsofdecision interrogatories -  the two entries I have under that tag.

Using the filter would be much easier -- but at least I can get the job done!

  • Like 1
Link to comment
7 hours ago, rmeadow said:

But when I renamed the tag to StatementsOfDecision (it doesn't have to have capitals), it worked fine.

@Boot17's suggestion of quotation marks works fine as does your "camel case" solution. Personally I prefer snake case (Statements_of_Decision) becuase I think it is more readable and saves me having to remember to add quotation marks.

Link to comment
1 hour ago, Mike P said:

Personally I prefer snake case (Statements_of_Decision)

TIL snake case was a thing and I've been using it forever 😁

  • Like 1
Link to comment
As I've noted above, to be able to search having filtered you have to ensure that the filter appears underneath the search box. One way to do this is to force a reload but this is unreliable, slow and has unwanted side effects like collapsing the tag hierarchy in the sidebar and removing task filters in the task view.
 
I have now discovered a much better workaround. Simply collapse and expand the sidebar. (F10 twice). This is simple, fast and always works (for me at least). So to summarise the process
  • Filter by tag (e.g. click a tag in the sidebar, use the filter menu, search for a tag in the main tag window or use ctrl+Q). Do not search for the tag in the main search as this is the one case where it works properly - but only one tag is ever displayed so it's not a useful workaround for me
  • The blue tag lozenge appears but there is no indication of a filter underneath the search bar.

image.png.7ac350bf42128a71356a38494af1899a.png

 
  • Press F10 twice and magically the tag appears under the search bar.
 

image.png.f2ed05c62a044b1e80219da3e85a4383.png

 
  • You can now add your search term and hit enter. Nothing will happen! However when you go back into the search bar and press enter again it works as expected. Remember, if you hadn't used the F10 x2 trick initially nothing would have happened either. However when you hit enter for the second time it would have searched for the term but dropped the filter.
 
This seems to work whenever there is a mismatch between the filter lozenges and the search window. e.g here there is only one blue lozenge but EN is confidently telling me there are two filters added.

image.png.e59a441d8c5546a36f345a39ca1d3ab7.png

Sometimes F10 x2 reconciles the filter and the search and then when you repeat the process that got you there in the first place it works as expected.
  • Like 2
  • Thanks 1
Link to comment
  • Level 5

Wow. That was easy! LOL But it works and is repeatable and gets us around a major functional shortcoming and quaky UI. Thanks, Mike P!  

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...