INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Quick question on searching  (Read 5433 times)

sluizer

  • World Citizen
  • ***
  • Posts: 113
Quick question on searching
« on: August 29, 2017, 11:39:12 am »

I was trying to search for all DB entries that have a semicolon in the artist field (as I mistakenly typed in a semi-colon instead of a comma in some of those entries). I tried the following, but none of them worked:
     artist=";"
or
     artist=/;
or
     artist="/;"

I know that at least one such entry exists, so the search I'm doing must not be correct. Can anyone help me with the correct incantation to do what I want?

Thanks.
Logged

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Quick question on searching
« Reply #1 on: August 29, 2017, 11:44:34 am »

Try

 [Artist] = ;

Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: Quick question on searching
« Reply #2 on: August 29, 2017, 11:46:33 am »

I don't think you really can because the semi-colon is the list-style field delimiter (and artist is a list).

You can trick it a little by using an expression like this:
[=ListCount([Artist])]=2

Does that help?
Logged
Matt Ashland, JRiver Media Center

sluizer

  • World Citizen
  • ***
  • Posts: 113
Re: Quick question on searching
« Reply #3 on: August 29, 2017, 12:05:25 pm »

Try

 [Artist] = ;

Ken

Actually, although I didn't say so in my question, I tried using both "artist" and "[artist]" for each of the expressions I listed. None of them worked.

Thanks for the suggestion.
Logged

sluizer

  • World Citizen
  • ***
  • Posts: 113
Re: Quick question on searching
« Reply #4 on: August 29, 2017, 12:23:30 pm »

I don't think you really can because the semi-colon is the list-style field delimiter (and artist is a list).

You can trick it a little by using an expression like this:
[=ListCount([Artist])]=2

Does that help?


Yes, thank you very much. That does help.

But I'm trying to modify the expression to make it greater than or equal to 2, because there is at least one artist where I used 2 semi-colons (found it by accident), and there may be others where I used more than that. I've tried:
     [=ListCount([Artist])]=>=2
and a few others, but none of them seem to work. I've looked at the wiki pages for the Search Language and Expression Language, but I don't see how to make the change I need. I know it should be simple, but I'm missing it.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: Quick question on searching
« Reply #5 on: August 29, 2017, 12:24:56 pm »

Well coming next build we'll have this:
Changed: Made searching on an expression work with greater than and less than signs to treat it as a number (that makes a search like [=ListCount([Artist])]=>1 work).

So right now you can't use greater than or less than, but you will be able to next build.

You could use something like =2,3,4,5,6,7,8,9,10 for now.  It would mostly work...
Logged
Matt Ashland, JRiver Media Center

sluizer

  • World Citizen
  • ***
  • Posts: 113
Re: Quick question on searching
« Reply #6 on: August 29, 2017, 12:29:54 pm »

Well coming next build we'll have this:
Changed: Made searching on an expression work with greater than and less than signs to treat it as a number (that makes a search like [=ListCount([Artist])]=>1 work).

So right now you can't use great than or less than, but you will be able to next build.

You could use something like =2,3,4,5,6,7,8,9,10

It would mostly work...


Yes, it would mostly work. Thank you so much for your help. I am glad that you are adding the ability to search on inequalities.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Quick question on searching
« Reply #7 on: August 29, 2017, 02:24:10 pm »

Interesting. I look for semi colons in keywords to count people, I think. Used it so long I've forgotten how and I've no MC handy just now...
I wonder.. Does [=isequal([artist,0],/;,8)]=1 work?

If it does, you could possibly rework the expression using the replace function to change the to commas...

sluizer

  • World Citizen
  • ***
  • Posts: 113
Re: Quick question on searching
« Reply #8 on: August 29, 2017, 03:56:58 pm »

Interesting. I look for semi colons in keywords to count people, I think. Used it so long I've forgotten how and I've no MC handy just now...
I wonder.. Does [=isequal([artist,0],/;,8)]=1 work?

If it does, you could possibly rework the expression using the replace function to change the to commas...


Yes, it does seem to work. Thank you very much.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Quick question on searching
« Reply #9 on: August 29, 2017, 11:58:21 pm »

Nice one. Thanks for letting us know.
I have an MC in front of me now, and have tested this. Try one before going wholesale, just to make sure it's what you want. If not, ctrl+z (Undo) will be your friend.

Use the search term, in the search field top right to bring you all the files you want.
Select one.
Have the tag window open.
Click on the artist field to edit it, and enter...
Code: [Select]
=replace([artist,0],/;/ ,/,/ )Press 'enter' and "First; Second" should become "First, Second"

Happy?
Select the whole lot and repeat to have all the semi colons replaced with commas.
Job done :)

-marko

sluizer

  • World Citizen
  • ***
  • Posts: 113
Re: Quick question on searching
« Reply #10 on: September 02, 2017, 10:59:42 am »

Nice one. Thanks for letting us know.
I have an MC in front of me now, and have tested this. Try one before going wholesale, just to make sure it's what you want. If not, ctrl+z (Undo) will be your friend.

Use the search term, in the search field top right to bring you all the files you want.
Select one.
Have the tag window open.
Click on the artist field to edit it, and enter...
Code: [Select]
=replace([artist,0],/;/ ,/,/ )Press 'enter' and "First; Second" should become "First, Second"

Happy?
Select the whole lot and repeat to have all the semi colons replaced with commas.
Job done :)

-marko


Thanks. I got it done with with the other suggestions, but I keep this one in reserve and give it try if ever needed. Thanks.
Logged
Pages: [1]   Go Up