Add multiple conditions inside a condition builder

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2020 05:18 AM
Hi,
I have a condition builder with 2 separate conditions:
Criteria 1:
Criteria 2:
How to merge the result of both the criteria via AND operator.
Regards,
Anirban
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 07:54 PM
You forgot to mention, that both conditions refer to different tables (Condition 1 = Incident & Condition 2 = Change). Therefore you cannot combine them, because a condition builder can be built on one table only.
The only way to have both tables in one condition builder is to create a database view (see Documentation or Youtube Videos), but without any further details, I cannot tell you how build it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2020 01:16 AM
The problem statement is created using a business rule on incident table.
The major constraint on combining both the criteria 1 and criteria 2 is that, when we combine the criteria 2 with criteria 1, then the criteria 2 won't be evaluated separately.
To simplify, let's say, Criteria 1 has 3 checks(A.B.C) and Criteria 2 has 2 checks(X.X' || Y.Y'). I want [A.B.C] . [X.X' || Y.Y'] which is same as saying A.B.C.X.X' || A.B.C.Y.Y', however in service now condition builders, if we combine, it would become A.B.C.X.[X' || Y].Y'
Note: using '.' for AND operator and '||' for OR operator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2020 02:14 AM
I suppose the condition builder is not able to map such complex conditions.
But you could script your condition in a Script Include and use the "Condition" field in the "Advanced" tab for invoking the Script Include, like
new MyComplexConditionHelper().check(current)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2020 02:57 AM