INTERACT FORUM

More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: sluizer on August 29, 2017, 11:39:12 am

Title: Quick question on searching
Post by: sluizer 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.
Title: Re: Quick question on searching
Post by: kensn on August 29, 2017, 11:44:34 am
Try

 [Artist] = ;

Ken
Title: Re: Quick question on searching
Post by: Matt 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?
Title: Re: Quick question on searching
Post by: sluizer 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.
Title: Re: Quick question on searching
Post by: sluizer 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.
Title: Re: Quick question on searching
Post by: Matt 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...
Title: Re: Quick question on searching
Post by: sluizer 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.
Title: Re: Quick question on searching
Post by: marko 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...
Title: Re: Quick question on searching
Post by: sluizer 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.
Title: Re: Quick question on searching
Post by: marko 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
Title: Re: Quick question on searching
Post by: sluizer 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.