Reputation: 425
I am facing one issue in Sitecore personalization .
Issue : I want to apply condition where [Product code can be anything among ( A,B,C,D ) but Role must be "pp".
For this my personalization condition will be as below : In this "and" condition not executing .
where user profile ProductCode field contains A or where user profile ProductCode field contains B or where user profile ProductCode field contains C or where user profile ProductCode field contains D and where user profile Role field contains PP
Please suggest
Upvotes: 3
Views: 462
Reputation: 1182
Recently while working with Personalization in the Marketing Center I faced a similar situation. Having nested ANDs or ORs and even EXCEPT WHEREs can become a task and a half to work out the logic for anyone.
A simplified version that I applied was along these lines:
Each of the 4 sub rules contain the same condition with the ProductCode field changing.
Let us know if it works and makes the Rule more readable.
Happy Sitecoring!
Upvotes: 1
Reputation: 5860
It is relatively easy to get in a twist, when doing combined and nested and/or expressions. Given that you can't really do a paranthesis around subparts of an expression, one sometimes have to re-think how these expressions are set up.
What I normally recommend, is to try and set up your condition in this manner. If nothing else, it will make it easier for you to debug and assess where things go wrong.
Upvotes: 4