Open madben2000 opened 5 years ago
Hi @madben2000,
The EndGroup()
doesn't exist because each group is automatically closed upon starting a new one, you just need to move all groups to the end of your expression. And, by the way, there is also no need to use StartGroup()
for the very first group because it's automatically created as well. In that sense, your proposed expression should look something like this:
var filter = new Filter<MyType>();
filter.By("a", Operation.EqualTo, 5);
filter.By("d", Operation.EqualTo, 1);
filter.StartGroup();
filter.By("a", Operation.EqualTo, 8);
filter.StartGroup();
filter.By("b", Operation.EqualTo, 5, Connector.Or);
filter.By("c", Operation.EqualTo, 7);
I would ask you to please let me know if that works for you as I wrote the above snippet off the top of my head and didn't test it.
Cheers, David
Sorry for my late response. Yes for my expression this would be possible. But what about
(A=1 || (B=2 && F=5)) && (C=3 || D=4)
as asked in #49? I have no idea how to create muliple non-nested groups like
(Group1) && (Group2)...
Hey,
there only exists StartGroup() function. How to end a group? How do you build following statement:
a=5 or (a=8 and (b=5 or c=7)) or d=1
Thanks