Set Multi related asset metadata field with trigger


(Matthew Harding) #1

5.4.6.1

We currently have a text field that we put comma separated asset ids to serve as dynamic root nodes for some asset listings. We’d like to change this over to a more user friendly related asset metadata field.

I’ve tried using a trigger with Set Metadata Value however i’m not having any luck with getting the text field into a suitable format using the dynamic parameters.

I’ve tried using %asset_<old_field>^implode:,%, adding in various json_de/encodes, %asset_<old_field>%, the straight value, and the straight value with [].

Any advise would be appreciated.


(Bart Banda) #2

Try using

%asset_metadata_text^explode:,%

Because you want to convert the string by the specified delimiter into an array.

Works for me in 5.5.6


(Matthew Harding) #3

Thanks Bart, i actually was using explode despite what i wrote in the first post. I had use default unchecked, I assumed that the dynamic parameters would override the set values.

It is working as expected now, thanks.