INTERACT FORUM

Please login or register.

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

Author Topic: Detect semicolon in Artist field  (Read 1551 times)

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Detect semicolon in Artist field
« on: May 04, 2013, 04:54:22 am »

Hi,
What is the easiest way to find tracks that have a semicolon in the Artist field?
I tried to use a Smartlist just searching for the ; char, but it gave no results.
Thanks!
Logged

kstuart

  • Citizen of the Universe
  • *****
  • Posts: 1955
  • Upgraded to MC22 Master using preorder discount
Re: Detect semicolon in Artist field
« Reply #1 on: May 04, 2013, 02:33:04 pm »

In MC18, semicolon is reserved to do the job of separating multiple entries.  For example, Artist is a List Datatype, and so you can have

Sarah Brightman & Andrea Boccelli ; Sarah Brightman ; Andrea Boccelli

which would then list the album under three different Artists:

Sarah Brightman & Andrea Boccelli
Sarah Brightman
Andrea Boccelli

Actually, semicolon is a good choice, because I did a search of my music drive and found no instances of semicolon in anything.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Detect semicolon in Artist field
« Reply #2 on: May 04, 2013, 05:23:49 pm »

[=isequal(listcount([Artist]),1,5)]=1

Get to an audio view that has all of your audio, and pop the string above into the search field. Any files left in the list after that will have a semicolon in the artist field.

-marko

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Detect semicolon in Artist field
« Reply #3 on: May 04, 2013, 10:45:07 pm »

Quote
[=isequal(listcount([Artist]),1,5)]=1
Get to an audio view that has all of your audio, and pop the string above into the search field. Any files left in the list after that will have a semicolon in the artist field.

I understand the use of combining isequal and listcount, but what does the opening [= and closing ]=1 perform?
Thanks a lot!
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Detect semicolon in Artist field
« Reply #4 on: May 05, 2013, 07:10:47 am »

When you wish to use MC's expression language in the search field, this is the way to construct the search.

Basically, the expression itself, "isequal(listcount([Artist]),1,5)" which asks if listcount is greater than 1, will always return a 1, for positive, or a zero, for negative.

In order to use the search bar to filter on these results, we wrap as shown.
[= The opening instructs the search field that the expression engine needs to be called to deal with this, rather than it be treated as a literal string.
]=1 The ending hands the results back to the search field for it to use in its filtering. In the given example, if you changed the tail to read "=0", your search would result in all files without a semicolon in the artist field.

-marko

Humbledore

  • Galactic Citizen
  • ****
  • Posts: 272
Re: Detect semicolon in Artist field
« Reply #5 on: May 05, 2013, 09:06:07 am »

Marko, thanks for the clarification!
Logged
Pages: [1]   Go Up