Trigger Match boolean value

Hello Everyone,

I’m new here, just exploring the triggers.
I have a question regarding the trigger match expression.

example : Below Data

{
“_id”: {
“$oid”: “6259d2eeb16e9c4519ed0e84”
},
“alertflags”: true
}

If I want yo do a trigger on insertion.

Match Expression: {“alertflags”: true}

But trigger is not starting on above match expression. I’m missing any syntax in match expression?

Thank you.

So triggers operate on "Change Event"s. See here for more information: https://www.mongodb.com/docs/manual/reference/change-events/

I think you likely want your matchExpression to be { fullDocument.alertflags: true }

Hope this helps,
Tyler

Thank you Tyler for the quick response. It worked , I will be trying using terminology from above url.

Thank you,
Arun.