You need to sign in to do that
Don't have an account?
ISPICKVAL
I am trying to prevent only certain users from choosing Closed Won or Closed Ordered. I am new at this and the syntax is a little confusing. The reason I am using the alias field is simply because Roles and Profiles cross over divisions and we have several folks with the same last names. Please help. Is there a better way to get this to work?
OR(
(ISPICKVAL(StageName, "Prospecting"),
(ISPICKVAL(StageName, "Qualifying"),
(ISPICKVAL(StageName, "Solution Proposed"),
(ISPICKVAL(StageName, "Proposal Submitted"),
(ISPICKVAL(StageName, "Recommended"),
(ISPICKVAL(StageName, "Approved"),
( $User.Alias, "ealba"),
( $User.Alias, "DWard"),
( $User.Alias, "PTatt"),
( $User.Alias, "TScir"),
( $User.Alias, "DKapp"),
( $User.Alias, "DHillNMI"),
( $User.Alias, "MCasa"),
( $User.Alias, "SColl"))
)
I did that from my iPhone! Sorry. I will stick with you until we have this. This validates for me:
AND (
OR ( ISPICKVAL(StageName, "Closed Won"),ISPICKVAL(StageName, "Closed Ordered")),
OR ( $User.Alias = "ealba", $User.Alias = "DWard", $User.Alias = "PTatt", $User.Alias = "TScir", $User.Alias = "DKapp", $User.Alias = "DHillNMI",$User.Alias = "MCasa", $User.Alias = "SColl")
)
All Answers
If you are trying to prevent these users you can try the following. It would be better to group them by profile or role and then reduce this to $User.Profile for No Close Users.
AND (
OR (
(ISPICKVAL(StageName, "Closed Won"),
(ISPICKVAL(StageName, "Closed Ordered"))
OR (
( $User.Alias, "ealba"),
( $User.Alias, "DWard"),
( $User.Alias, "PTatt"),
( $User.Alias, "TScir"),
( $User.Alias, "DKapp"),
( $User.Alias, "DHillNMI"),
( $User.Alias, "MCasa"),
( $User.Alias, "SColl")))
Profile ID is not possible, as there are several in the same profiel that need the function. I tried the sytax you provided but I received the error below; I tried using Role ID and I am getting the same error, "Syntax error. Missing ')' - highlighting the comma after "Closed-Won), - I have tried several scenarios, but still not getting it. Help please.
AND (
OR (
(ISPICKVAL(StageName, "Closed-Won"),
(ISPICKVAL(StageName, "Closed-Ordered"))
OR (
( $UserRole.Id, 00E40000007Axy1),
( $UserRole.Id, 00E40000007Axxs),
( $UserRole.Id, 00E40000007Axxr),
( $UserRole.Id, 00E40000007Axxw),
( $UserRole.Id, 00E40000007Axz4),
( $UserRole.Id, 00E40000007A37e),
( $UserRole.Id, 00E40000007ayeg)))
(ISPICKVAL(StageName, "Closed-Won"),
Should be
ISPICKVAL(StageName, "Closed-Won"),
I think. Removed first "("
Sorry to be such a pain. Now I am getting the following error:
Error: Syntax error. Missing ')' in front of the second OR (
I did that from my iPhone! Sorry. I will stick with you until we have this. This validates for me:
AND (
OR ( ISPICKVAL(StageName, "Closed Won"),ISPICKVAL(StageName, "Closed Ordered")),
OR ( $User.Alias = "ealba", $User.Alias = "DWard", $User.Alias = "PTatt", $User.Alias = "TScir", $User.Alias = "DKapp", $User.Alias = "DHillNMI",$User.Alias = "MCasa", $User.Alias = "SColl")
)
It worked! Thank you, thank you, thank you!!!!! I really appreciate it!