Trigger to update link


(Ben Chapman) #1

I am trying to set up a trigger for what I think should be a pretty common situation. I want every asset created at a particular tree location with a type_1 link to have their link changed to type_2.

 

I am using a trigger with the action "Update link", but the trigger refuses to fire because it claims that more than one link is detected.


(Bart Banda) #2

Is the folder they are getting created in linked to another location? How many links are on the folders linking screen? And what does your Update Link config look like?


(Ben Chapman) #3

Is the folder they are getting created in linked to another location? How many links are on the folders linking screen? And what does your Update Link config look like?

 

The assets are being created under an asset listing asset, which is linked to a couple of design customisations. It therefore has three linked parents on its linking screen, a type_2 and two notices. It has numerous type_2 and one notice linked children.

 

To my mind, the fact that this parent asset has no existing type_1 links should mean that the newly created type_1 link that I want to update shouldn't conflict with any existing links.

 

This is the config of my update link trigger:

 

Events

asset created

 

Conditions

tree location (the asset listing asset)

asset is of type (standard page)

 

Actions

update link:

link characteristics:

  link type: type_1

  link value:

  side of link: parent

  asset type: standard page

new link characteristics

  link type: type_2

  link value:

 

This is the error I get when I create a new standard page under the asset listing, with a type_1 link:

 

"More than one link found with the characteristics specified in 'Update Link' Trigger Action. [TRIG0007]"


(Bart Banda) #4

Hmm, not sure what could be wrong. What version of Matrix are you using? Maybe try testing the trigger on a separate folder that will make the created standard page only get 1 link and see if it runs there?


(Ben Chapman) #5

Hmm, not sure what could be wrong. What version of Matrix are you using? Maybe try testing the trigger on a separate folder that will make the created standard page only get 1 link and see if it runs there?

 

I'm running 4.18.3.

 

I have created an empty folder and set the trigger 'tree location' condition to the folder, then tried creating assets in the folder. I get the same problem.


(Steve Scamp) #6

Interestingly, I'm having the same problem, only we're looking to create assets of Single and Recurring Calendar Event asset types in a set of Folders - otherwise the Trigger configuration is pretty much the same. We're on 4.18.4.

 

I'll be very interested to see if anybody can find a solution to this one! 


(Ben Chapman) #7

Interestingly, I'm having the same problem, only we're looking to create assets of Single and Recurring Calendar Event asset types in a set of Folders - otherwise the Trigger configuration is pretty much the same. We're on 4.18.4.

 

I'll be very interested to see if anybody can find a solution to this one! 

 

I've been looking through old posts on the forum on this topic and I have found an earlier example of someone having trouble with the update link trigger that seems quite similar to the problem Scampus and I are having. I wonder if the implementation of this trigger is a bit ropey.

 

I'm surprised it isn't easier to set up a trigger for updating links for newly created assets, as I would have thought this would be a commonly required function.


(Bart Banda) #8

Hey guys, I've reported this as a bug as I tried to replicate a really simple test in the latest version of Matrix and couldn't get it to work, got the same error message. I'll let you know what they come back with. 


(Bart Banda) #9

Actually, just tested again, but I changed the "Side of link" value from Parent, to Child, and it worked.

 

Ben, can you try the same thing and let me know if that works for you?


(Ben Chapman) #10

Actually, just tested again, but I changed the "Side of link" value from Parent, to Child, and it worked.

 

Ben, can you try the same thing and let me know if that works for you?

 

Bart, yes I now have it working using your tip.

 

It seems that the key is to have "side of link" set to child and the "asset type" of the link characteristics to be set to the asset type of the parent. (I tried a variety of combinations for the link characteristics settings, but I seemed to have missed that combination.)

 

Thanks for your help Bart. It is going to be very useful having this trigger in my toolbox.


(Steve Scamp) #11

Folks,

 

I finally found some time to give this a go, and I'm happy to report that I too got Bart's solution to work for (most of) our calendar events.

 

(It works for Multi-date Events, and for Single and Recurring Events that are children of Folders, as most of our events are; And while it doesn't work for those Single and Recurring events that are direct children of Multi-date Events, I think we can live with manually changing the Linking Types on them, and we're still well ahead of where we were.)

 

So, many thanks from me too, Bart. I appreciate you tracking down this solution for us.

 

Cheers,

Steve