"and" and "or" together

For an action, I use multiple conditions. I now face a problem, that I need "and" and "or" together.

It should be like:

(Condition1 OR Condition2 OR Condition3 OR Condition4) AND Condition5


Is there any way to get something like this?


Greetings,

dampio

Discussion (5)

What about using 2 actions:


For example:

1. Go To Next Page IF Entry1=A OR Entry1=B OR Entry1=C where conditions are set to "Any condition can be true"

2. Go To Next Page IF Entry2 = Hello

You have to combine two actions in which the first action checks the OR condition, and the second one combines a result from the first action with the AND condition like so:


Action 1:

Set variable = 1 if any condition 1, 2, 3, 4 are met

Else set variable = 0


Action 2:

Run action if variable (from action 1) = 1 and condition 5 are met



Hope this makes sense, let me know if you have any trouble with it!

Unfortunately this does not work for me...

The action is within a action group and is triggered by 4 different dropdown menus. And only for 2 this would work. With the other two, i would get problems... I think...


But I know what you mean, and it does make sense! :-) Well... at least for me... :-)


I solved it in another way. I wanted it to always show a picture but not, when the named conditions are set. I now inserted every case, where it is allowed to show. Much longer, but working very fine.


Thanks for the try. I will keep that in mind. I am sure, there will be a day, where I have to use this... :-)

I have come to utilize action groups for this type of functionality. Example:


ActionGroup1

If A = 1 or 2 or 3 or 4, then Run ActionGroup2


ActionGroup2

If B = 5 then


This works because actions within action groups do not execute unless you specifically run the group.


So you set the OnChange action for your dropdown menus to Run ActionGroup1. If the condition of ActionGroup1 is not met, ActionGroup2 does not fire.


If you're familiar with programming, I'm basically using action groups like sub-routines or functions.


Hope this helps!


--David

This is based on the fact that you cannot have multiple GoTo actions stacked on the same object (OnClick Button for instance). The first action will fire, navigate to the page, thus not allowing the second GoTo action to fire.


You will just need the same number of actions for how ever many 'AND's you have.


Action #1:

Condition 1 AND Condition 5


This is not satisfied with the correct variable value so the action firing sequence will pass on to the next set of conditions, representing the 'OR'


Action #2:

Condition 2 AND Condition 5


This is not satisfied with the correct variable value so the action firing sequence will pass on to the next set of conditions, representing the 'OR'


Action #3:

Condition 3 AND Condition 5


This is satisfied and the action is permitted to fire.

Discussions have been disabled for this post