Author Topic: Functions $Contains and $Ismatch not working properly, or is it my fault?  (Read 1552 times)

stardot

  • Jr. Member
  • **
  • Posts: 32
Hi,

I am using the function $Contains to search for a certain word in the field <Artist>.

So if I wrote this in the artist filed : Artist with Artist

then I wrote in Virtual Tag $If($Contains(<Artist>,"with")="T", <Artist>,)

that does not work.

Why?

Thanks
Last Edit: August 08, 2020, 07:23:23 AM by stardot

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10711
Is the typo in "with" copied from your actual virtual tag? Also, Contains should be $Contains.
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest patches (3.5/3.6)
(Unzip and overwrite existing program files)

stardot

  • Jr. Member
  • **
  • Posts: 32
Oh this was a typo from me. But in the software it is written as it should be.

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10711
Hmm. It looks like it should work, then. Can you post a screenshot of the virtual tag with the results? (What you get if you click the [...] button by the virtual tag, and then "Preview".)
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest patches (3.5/3.6)
(Unzip and overwrite existing program files)

stardot

  • Jr. Member
  • **
  • Posts: 32
Sorry there is more to the characters involved in the field <Artist>.

It is actually : "Artist (feat. Artist)"

And then I put: $If($Contains(<Artist>,"feat")="T",<Title>,)             <----- This doesn't work.

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10711
The screenshot will still be the most helpful thing at this point.
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest patches (3.5/3.6)
(Unzip and overwrite existing program files)

stardot

  • Jr. Member
  • **
  • Posts: 32


As you can see, only track number is in the result, but the title is not there.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34416


The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1290
that does look like a bug so i will look into it

Could you explain what the bug was? I use lots of $Contains() and $IsMatch() functions and haven't had any issues with them, so if I was unconsciously working around a bug, it would be good to know what's going on, so I can adjust my functions accordingly. Thanks
Last Edit: August 08, 2020, 04:32:11 PM by The Incredible Boom Boom