INTERACT FORUM

More => Old Versions => JRiver Media Center 24 for Windows => Topic started by: rn701 on June 13, 2018, 10:13:57 am

Title: Unable to search for semi-colon
Post by: rn701 on June 13, 2018, 10:13:57 am
In search, search wizard, or smartlists, unable to search for semi-colon character (;). Trying to search artist field for any that have a semi-colon.
Title: Re: Unable to search for semi-colon
Post by: swiv3d on June 13, 2018, 12:22:58 pm
I think that artist is a semicolon delimited list with a single string stored for each file. So the database does not store "Joe Bloggs; Fred Smith" as a string it would store Joe Bloggs, stopping at the delimeting semicolon. This provides the drop down list when you enter the field and you see a list of all of the separate artists in your library database. So searching for a semicolon in this field would be impossible. Other fields such as album which are just strings can have a semicolon in them and they can be found by a smartlist search for Field Contains ;

Hope his helps.
Title: Re: Unable to search for semi-colon
Post by: rn701 on June 13, 2018, 01:15:11 pm
Thanks!
Title: Re: Unable to search for semi-colon
Post by: marko on June 14, 2018, 12:59:14 am
The following in the search bar will return all files from the list that contain a semi-colon in the artist field....

[=isequal([artist,0],;,8)]=1

-marko
Title: Re: Unable to search for semi-colon
Post by: swiv3d on June 14, 2018, 07:08:29 am
I did say " I think"  - so it stores the semicolon and uses it to split items into a list on display. I keep on learning from you Marko. Now how about an expression to locate the position of a character in a string eg position of "-" in a string like "01 - Blah blah"  I could really make use of that one. Thanks for keeping me on a steep learning curve!
Title: Re: Unable to search for semi-colon
Post by: marko on June 14, 2018, 09:20:24 am
You were pretty much correct, however, in situations like that, we can drop into expression land...
In there, we can add the ,0 inside the library field brackets, and that tells the expression engine to use the raw field data, and the "8" operator instructs to return anything that contains the search characters.

I don't think there's a way to return the position of a character. It might be possible via regex, but I don't know much about that, so could be talking complete nonsense about that!