Using a trigger to create a linked asset in specific locations


(Flick 7) #1

Hi there,

 

I have created a calendar using single calendar event assets. Each of these assets have metadata applied to them that specifies (among other things) the location and the topic of the event.

 

Each of the event assets are created in location folders (i.e. Sydney, Melbourne, Brisbane etc), and I would like to set up a trigger that automatically creates a linked copy of the assets in the relevant topic folder (i.e. Financial Management, Communications and writing etc).

 

Using the "create link" action of the trigger, is there a way to establish a relationship between the metadata value and the topic location (e.g. "financial-management" as the metadata key means a linked asset would be created in the "Financial Management" folder)?

 

I hope there's a way to do this with a trigger because it'll be frustrating having the create lots of these links manually!


(Ashish Karelia) #2

Hi,

If you can store the asset id of the target folder (e.g  "Financial Management") on the metadata field value then following should work:

 

Action:

Asset link created or Asset created

 

Condition:

Trees Location (and perhaps type os asset too) to restrict the assets you want.

 

Action

Create Link.

Since the trigger is going to be fired on Event asset created, You will need to select Link as the "Child" ofhe asset then use Parameter source as

"Target Asset" > "Current Asset" > "Keyword"

Here you should be able to use the metadata keyword to evaluate the assetid the asset should be linked under.

 

Hope this isn't too confusing. Please feel free to ask if there are any questions.

 

Ash


(Flick 7) #3

Hi Ash,

 

I think I've put in everything correctly, but I have only managed to get the trigger to create a linked asset under the parent asset I selected in the Actions panel. I tried leaving the "Link as the Child of the asset xxx" part null, but got a Core Error (130) as it needed something defined.

 

The keyword I'm using to refer to the metadata value is %asset_metadata_courseTopic_key%.


(Ashish Karelia) #4

Thats a bit of a bummer. I just tried the same set up and seems like a glitch somewhere.

Are you creating asset via an asset builder? JS API would be another way of creating/modifying asset links.

If you are a Squiz Client, you should be able to get help with implementation if required.

 

 

Hope that helps.


(Flick 7) #5

No, not an asset builder - I'm just creating single event assets. it's not a deal breaker for the project - just would have been handy to have to save the manual step of linking the asset after it's published.