I have a trigger that creates a link when a user updates a metadata field of a PDF file. It does the linking, but under the wrong conditions for 'Asset Metadata Updated' values. I have a checkbox for the metadata, where the user selects cats or dogs it should link under the folder of that name.
At the moment there is only one active trigger that should link PDFs with the dog field selected to Dogs folder.
The problem is if I set metadata on a Dog PDF to dogs it does nothing, and if I change the metadata to cats (something other than dogs) it will link to dogs folder. If I delete the link, change metadata it back to dogs the trigger does nothing again.
I don't want to try the inverse condition as there are likely more category's soon.
Thanks
I've done a quick test on a 3.24 system and can't replicate the issue your having. I had thought perhaps it might not broadcast the event if the value you had selected was already the default, but it appeared to fire the event regardless of any change as long as the metadata screen was committed.
There is an additional event, which also worked for me called 'after asset metadata updated'. I'm assuming this triggers a little later in the code from it's description, so you could perhaps try that.
Hard to tell why yours might be doing the inverse, although I did find an older bug report that might relate: http://bugs.matrix.squiz.net/view_bug.php?bug_id=3179 - I'm guessing in that case the other event of 'after asset metatadata updated' might help.
Thanks Anthony,
'after asset metatadata updated' event is working much better. It's probably a better option as well as I see myself needed to regen the metadata. Not sure when I would use 'Asset Metadata Updated' event now, but i'm happy that the new event works 