Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: $ifequal(%date%,%release date%,$replace(%release date%),) (Read 521 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

$ifequal(%date%,%release date%,$replace(%release date%),)

Hi there.

I'm trying to create a syntax in Masstagger to automate the removal of %release date% whenever it equals %date%.

I tried "Guess value from file names" but it didn't work. This is the syntax I set up:

Code: [Select]
$ifequal(%date%,%release date%,$replace(%release date%),)

Could someone please help me?

Thanks in advance

Re: $ifequal(%date%,%release date%,$replace(%release date%),)

Reply #1
Why file names?

Format value from other fields.
Destination: RELEASE DATE
Pattern: $if($strcmp(%date%,%release date%),,[%release date%])

If the pattern evaluates to blank then the field is removed.

Re: $ifequal(%date%,%release date%,$replace(%release date%),)

Reply #2
@j7n

I don't understand why my syntax didn't work... it seemed very logical...

Thank you so much for your help, I couldn't come up with this syntax on my own, no matter how hard I'm practicing...

My need is (very well) resolved.

Re: $ifequal(%date%,%release date%,$replace(%release date%),)

Reply #3
You took the filename as input instead of tags, and entered an expression intending to output one value in the box meant for a list of fields to be found in the source. It is possible to extract for example, %tracknumber% - %title% - %date% and thus fill in 3 fields with one action. A "guess" action can be used to create one field but, unlike "format", the action will not delete it. You would put your pattern in the first box in a guess action, and just %field% in the second (opposite of "format").

$replace(%release date%) does not make sense. The function is meant to substitute a text fragment in the argument with something else. If you don't indicate what to replace, this function outputs nothing. So your true and false conditions are both empty strings.

Re: $ifequal(%date%,%release date%,$replace(%release date%),)

Reply #4
OK. Thank you very much!

I need to dedicate myself more to my studies and keep practicing!