How to make on-demand context menu tagger script?

I am trying to make an on-demand context menu tagger script that sorts multiple values in the %genre% field, as well as purges duplicate values in the %genre% field.

My issue is that the context menu, Run Scripts, when clicked from either the Unclustered Files or Clusters node has no effect on the %genre% tag.

My tagger script,

$sortmulti(%genre%)
$unique(%genre%)

Am I doing something wrong?

The reason I want to access this from the Unclustered Files/Clusters node is that my files are already tagged with MB metadata, so I do not need to retag them from MB. I basically want to sanitize my %genre% tags with my own existing values.

I think that the problem is that you’re not assigning the returned values to anything. Perhaps try something like:

$set(genre,$unique($sortmulti(%genre%)))
3 Likes

That worked. Thank you sir.

1 Like