>Hi everybody,
>
>I'm trying to create a filter on one condition + another condition + (3rd condition or 4th condition) and I could not figure out how to properly find the right parenthesis.
>
>(Primary Person is Yes and Type does not equal Y and ( Campaign equals DIN07 (ask at runtime) ) or Event equals DIN07
>
>It would be nice if we can change the directly in the filter condition field.
You can't use strextract() to match parentheses, because it will find the first occurrence of the right parenthesis. You can use it to find the string thus far (including delimiters), then count by occurs() the number of left and right and left parentheses in the string, then if there are more left and right ones, extend the substring to the next right one until these numbers match. That will give you the whole string within the first parenthesis.
Then if you need to dig deeper, you can do the same on the inner one.
And... I just tried this:
?STREXTRACT("outside (outer (inner) outer again) outside", "(", ")",1, 4)
?STREXTRACT("outside (outer (inner) outer again) outside", "(", ")",2, 4)
As you see, the first one gives me unbalanced parentheses; if so, then I can get the inner by looking for second occurrence. I can then manipulate that inner one, insert back into the outer one etc.
HTH.