Is Nested Logic Possible in a Trigger?
I wonder if anyone has a suggestion on how to create a nested logic trigger. For example, I have three T/F question and I want to change the state of an a 4th item to say "Suggested Review" depending on how the user answers the questions with the following logic:
Change the state of my object to "Suggested Review" if Q1 = True OR (Q2 = True AND Q3 = True).
- If Q1 as True then the state will change. I don't care how they answer Q2 or Q3; I want the state to change.
- If Q1 = False and Q2 = True but Q3 = False then the state won't change. Q2 doesn't have enough weight to change the state on its own.
- If Q1 = False and Q2 = True AND Q3 = True then the state will change. It takes both Q2 and Q3 being True to put enough weight to change the state if Q1 is false.
If I use the conditions in sequence it doesn't seem to work properly:
Q1 = True
OR Q2 =True
AND Q3 = True
I need to nest them so it would look like this:
Q1 = True
OR Q2 = True AND Q3 = True
Sorry for the rather wordy post but I wonder if anyone has any great ideas or can point out what I'm missing.