Menu

Change Filter for Trigger

Dickinson
2021-10-13
2021-10-14
  • Dickinson

    Dickinson - 2021-10-13

    Hi Comboguys,

    I'd like to create a trigger that only sends a notification when teh Chante
    Type will be
    Normal or Emergency (not Routine). I'm testing several sentences to create
    a filter but any seems
    to work. I have something like:

    SELECT Change WHERE parent_id_finalclass_recall LIKE '%ergency%'

    or similar.

    How can I achieve that? One we have the OOQL sentence..what would be the
    way to
    put it into the filter?

    Appreciate your help

    Greetings from Colombia

     
  • Guillaume Lajarige

    Hello Dickinson,

    Could you try something like "SELECT Change WHERE finalclass NOT LIKE '%Emergency%'" ?
    If it does work, please provide a screenshot.

    Cheers,
    Guillaume

     
  • Dickinson

    Dickinson - 2021-10-13

    Dear Guillaume, you rule!

    It worked as expected. So for other that might need: to add a filter for notifications to send only to a specific type of change use the sentence:

    SELECT Change WHERE finalclass NOT LIKE '%Routine%'

    Just in the final part add the type of change to include/exclude.

    Thanks a million.

    Edu

     
  • Guillaume Lajarige

    Glad to see it helped!

    Have a nice day Edu,
    Guillaume

     

Log in to post a comment.

MongoDB Logo MongoDB