I would like to know if the $if function supports the scripting as below:
Per the docs, the $if function is as follows
$if(condition,then[,else])
so my curiosity is
$if(%title%,
$set(%title%,$title($lower(%title%)%_spacer%)
, $noop(else)
$set(%title%,%_deftitle%%_spacer%)
)
Essentially what I’m after is the ability to execute blocks of code in the “then” and “else” parts of the $if function.
Would I need to code something like this…
$if(%title%,
{
$set(%title%,$title($lower(%title%)%_spacer%)
}
, $noop(else)
{
$set(%title%,%_deftitle%%_spacer%)
)
Would something like this work currently:
$if($not(%artist%),
$noop(Check for missing "artist" value as well.)
$if($not(%artist%),
$set(%artist%,%_DefSnglArtist%)
$delete(%artists%)),
$noop(If there is a value in the "artists" field, then set the "artist" field to the first artist listed in the multi-value "artists")
$if(is_multi(%artists%),$cleanmulti(artists),
$set(%artist%,$title($getmulti(%artists,0)))
)
)
)
I don’t know. Is it possible to use blocks of code in each of those sections? If not, would it mean I have to do multiple $if 's one after another to execute each line of code I would like in a “code block”