Trigger to set a 'new link' to a pdf asset


(Mahearnpad) #1

Hi

I can see this is possible, but I just can’t seem to get the trigger working. Here’s what needs to happen:

  1. User updates metadata by setting the value in the ‘SiteLocation’ field to ‘Website’ (‘Website’ is an existing folder).
  2. On committing changes, I want the file to be ‘new linked’ into this ‘Website’ folder, as a child asset (so PDF should now exist in the original folder, plus the ‘Website’ folder).

The current setup of my trigger is:
Event: Asset metadata updated
Condition: metadata field ‘SiteLocation’ is exact match of ‘Website’
Actions: Create Link action. Link as ‘child’ of asset ‘Website’ using link ‘type1’. And I’ve checked the “ignore permissions” box. (I’m guessing something’s wrong at this point, but not sure).

Any ideas please?


(Bart Banda) #2

Does the trigger run at all? You can check that in the logs.

Can you provide a screenshot of the full trigger setup and explain a bit more about the actions you take where you expect the trigger to be run?


(Mahearnpad) #3

Hi Bart

Haven’t had a chance to check the logs yet. Will do as soon as I can. But here are screenshots of the trigger setup:


As you can see from the above, if the metadata field has the value “Intranet; Website”, and it’s been updated to that value, then the action I want the trigger to run is to create a “new link” to the asset in the Website folder.

When I get a chance today I’ll test it again and see if any part of it gets run, and let you know.

thanks


(Bart Banda) #4

Yea, looks like it should run ok, but maybe the condition is too strict? Maybe try partial match first and just try the word “Internet” to see if it actually runs at all.

But yea, check the matrix logs to see if the trigger fires successfully or not. If it fires and says it completed successfully, and the asset hasn’t been linked, then there’s somehing wrong.

But if there are no trigger logs at all of it firing, then it’s not firing because of the condition most likely.

Also make sure the trigger is Enabled :slight_smile:


(Mahearnpad) #5

Hey Bart

Partial match did it! Not sure this is the best solution going forward, but for now at least it works.

Thanks for you help.