Announcement

Collapse
No announcement yet.

Understanding filter OR/AND association

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Understanding filter OR/AND association

    Hi,

    I'm testing to add several steps to a filter and changing the operator (AND/OR) but from the UI it is not clear what is the association done internally to check the conditions, for example:

    #0 - Rule
    #1 AND Rule
    #1 OR Rule
    #1 AND Rule

    How is the evaluation done?

    a. (Rule1 AND Rule2) OR (Rule3 AND Rule4)
    b. Rule1 AND (Rule2 OR Rule3 AND Rule4)
    c. Rule1 AND (Rule2 OR Rule3) AND Rule4
    d. other?

    The natural order of evaluation, considering operator precedence, should be a. but I couldn't find any documentation about this.

    Any pointers are very welcome!

  • #2
    Code:
    #0         Rule
    #1   AND   Rule
    #2   OR    Rule
    #3   AND   Rule
    Think like that;

    Code:
    #1 && #2 || #3 && #4
    With Example;


    • If message MSH.9.1 equals RDE and MSH.9.2 equals O11 message will process.
    • If message SFT.3.1 contains TEST and SFT.4.1 exists message will process.
    • If message MSH.9.1 NOT equal RDE and MSH.9.2 equals O11; SFT.3.1 contains TEST and SFT.4.1 exists message will process.
    • If message MSH.9.1 equal RDE and MSH.9.2 NOT equals O11; SFT.3.1 contains TEST and SFT.4.1 NOT exists message will not process.

    Comment


    • #3
      Good, so it is the natural order of precedence, and it associates AND before OR.

      Thanks!

      ref: https://developer.mozilla.org/en/doc...tor_Precedence

      Comment

      Working...
      X