I cannot figure out how to use a script in Rule Based Mapping that will only execute when the tag exists and a value is found.
I want the script to read a custom tag named MasterYear and add " - " + the MasterYear value if a value is found.
For example, if the value of MasterYear is 2007 then the script would write " - 2008".
If there is a value in the MasterYear tag, it works fine. But, if I leave MasterYear blank, or delete it so the tag does not get created, the script still writes " - ".
Options I have tried include
IF [tag]MasterYear[] =
SET Album = [album] - [tag]MasterYear[]
and
IFCONTAINS [tag]MasterYear[] = 20
SET Album = [album] - [tag]MasterYear[]
IFCONTAINS [tag]MasterYear[] = 19
SET Album = [album] - [tag]MasterYear[]
I want the script to read a custom tag named MasterYear and add " - " + the MasterYear value if a value is found.
For example, if the value of MasterYear is 2007 then the script would write " - 2008".
If there is a value in the MasterYear tag, it works fine. But, if I leave MasterYear blank, or delete it so the tag does not get created, the script still writes " - ".
Options I have tried include
IF [tag]MasterYear[] =
SET Album = [album] - [tag]MasterYear[]
and
IFCONTAINS [tag]MasterYear[] = 20
SET Album = [album] - [tag]MasterYear[]
IFCONTAINS [tag]MasterYear[] = 19
SET Album = [album] - [tag]MasterYear[]
Comment