**Matrix Version: v5.5.6.4
How can I clone a shadow asset (Data Source Record Set asset)? Or alternatively use a trigger to create a new asset that contains the values from the Data Source Record Set asset?
We are using an XML Data Source asset for displaying alerts on the front end as part of an alerts system, when new alerts are added/removed from the XML feed the corresponding child Data Source Record Set shadow asset is added/removed.
We want to create an archive of all previous alerts which means creating a permanent asset in an Archive folder everytime a new item is added to the XML feed.
However I’ve found that simply cloning a shadow asset is impossible which makes sense as they don’t have their own asset id.
Is there a simple or clever way to create a clone (or equivalent new asset) when a new item is added to the xml feed?
I’ve been looking into a few solutions
-
use triggers to create a new asset and populate its metadata with the xml values (I’m not sure this is even possible)
-
use javascript and a frontend asset builder to check for new alerts and build a corresponding asset in an Archive folder (this just seems like a bad way to go about it)
I’m hoping someone has had similar experience with needing to create a clone or a copy of shadow assets and can offer some guidance?
Thanks