Description -
The condition builder in Fusion supports a very simplistic Boolean logic, allowing simple expressions such as (A && B) || (C && D). This is functional under many circumstances, though forces a lot of duplication of checks on the UI side.
The following is an example of a condition that would be problematic:
ID = "foo" && (Error 1 = true || Error 2 = true || Error 3 = true || Error 4 = true)
In the existing condition builder, it results in something that looks like this:
(ID = "foo" && Error 1 = true) || (ID = "foo" && Error 2 = true) || (ID = "foo" && Error 3 = true) || (ID = "foo" && Error 4 = true)
If we have to change the value of "foo", this creates a risk whereby a human may miss all instances of "foo". (This risk increases with increasingly complex conditions.)
The ask is to improve the condition builder to allow for full Boolean logic. We have a similar version built into our own product, and I'm attaching an example of what that type of UI might look like as a concept to showcase how to think about the proposal.
Why is this feature important to you -
We are currently having to implement such complex conditions through either (1) duplicating values/checks or (2) a series of Router and Set Variable modules that perform the evaluation using edge filters between modules. Either way, it's a cost/risk introduced due to a UI that is limited in its current form.
How would you like the feature to work -
Anywhere that conditions are allowed (event watchers, edge filters, etc.), use the same enhanced UI mechanism. Allow a user to create a Boolean expression similar to how a developer would do it -- through nesting and grouping of logical operators. If the backend needs to translate that down to a simpler form for evaluation, that can be transformed internally.
Current Behaviour -
Described above in the Description.