I’ve been trying to set up something in a MTM project, I’m not sure it’s possible ;
Here is the deal :
I need to use a Regex as a condition to execute a Trigger.
As I need the same Regex in all my triggers (quite a few), and as this Regex is likely to be modified quite often, I tried to record the content of the Regex in a Constant Variable, and to call this Variable in the trigger condition…
But so far, it doesn’t seem to work.
Anyone tried something similar ?
Can someone tell me if it’s feasible ? or if it is a current limit in MTM ?
That will execute your Regex and return 0 or 1…
Here an example to use a datalayer variables (userID and env in my case) in the JavaScript function variable:
That tip unlocked my situation !
Of course, it’s rather more difficult than what it could have been if we could write a Regex in a Constant Variable and just call it in the Trigger condition…
Maybe in the future.