# 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:

On Condition:

Q1 = True

OR Q2 =True

AND Q3 = True

I need to nest them so it would look like this:

On Condition:

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.

###### 4 Replies

It may not be the most efficient, but could you create two instances of the 4th item?

Instance 1 is tied to Q1, so Q1 = true will display instance 1.

Instance 2 is tied to Q2 and Q3, so instance 2 appears when Q2 and Q3 = true.

Scott, that's an interesting idea. That should work I think for this fairly simple example. Anyone else think nested conditionals would be useful? Or are they possible and I just don't know how to do it?

It would be good to be able to nest conditionals for sure - this way you end up having to create additional different "interim" variables.

Hi Dan!

You are welcome to share your thoughts with our product development team here.