You need to sign in to do that
Don't have an account?

Using Picklists in Formulas - Trailhead
Hello,
In the Admin Advanced --> Advanced Formulas --> Using Picklists in Formulas module, the challenge requirment is as follows:
"Create a validation rule formula that does not allow a user to mark a case as escalated unless the priority is set to 'High', the case was not Closed when Created, and the case isn’t closed."
I am setting up a valid formula (did a bunch of tests on Case object so I'm sure it is valid and I'm not going to post it here to let this remain as a challenge). I am using four fields, which are IsClosed, IsClosedOnCreate, Priority and Status, as understood from the challenge description.
However, checking the challenge gives me this error. Apparently, despite the description, we gotta use IsEscalated field instead of IsClosed:

After I change IsClosed field with IsEscalated in the formula, I get this error:

I am reproducing this scenario in a Case record and validation rule triggers.
Did anyone manage to pass this challenge? If not, could the Trailhead Dev Team have a look at wording of this challenge please?
Thanks in advance.
In the Admin Advanced --> Advanced Formulas --> Using Picklists in Formulas module, the challenge requirment is as follows:
"Create a validation rule formula that does not allow a user to mark a case as escalated unless the priority is set to 'High', the case was not Closed when Created, and the case isn’t closed."
I am setting up a valid formula (did a bunch of tests on Case object so I'm sure it is valid and I'm not going to post it here to let this remain as a challenge). I am using four fields, which are IsClosed, IsClosedOnCreate, Priority and Status, as understood from the challenge description.
However, checking the challenge gives me this error. Apparently, despite the description, we gotta use IsEscalated field instead of IsClosed:
After I change IsClosed field with IsEscalated in the formula, I get this error:
I am reproducing this scenario in a Case record and validation rule triggers.
Did anyone manage to pass this challenge? If not, could the Trailhead Dev Team have a look at wording of this challenge please?
Thanks in advance.
IsEscalated=TRUE &&
(NOT(ISPICKVAL(Priority, "High"))) ||
(ISPICKVAL (Status, "Closed")) ||
(IsClosedOnCreate=True)
All Answers
IsEscalated=TRUE &&
(NOT(ISPICKVAL(Priority, "High"))) ||
(ISPICKVAL (Status, "Closed")) ||
(IsClosedOnCreate=True)
Thank you for the insight on the need to use the IsEsclated field as part of the solution. Unfortunately, the challenge checker passed the following answer in my case: Not that I thought this was a correct answer! It is missing the two other OR conditions (status=closed and IsClosedOnCreate=TRUE) that are supposed to also trigger the rule. In other words, the challenge checker took it as sufficient that Priority be something other than "High". However, on a test record, I am able to take a Closed case and change it back to Escalated, one of the editing actions the challenge was specifically designed to prevent. So in my case the checker passed a challenge answer that should not have passed.
That said, I appreciate that Trailhead is free, and it is probably unreasonable to expect perfection in the answer checking. Hence the usefulness of this forum.
Thank you again for your help.
@Jennifer's answer is almost correct and might pass the challenge but will not work in a real scenerio. I have update her answer below to work perfectly.
IsEscalated=TRUE &&
((NOT(ISPICKVAL(Priority, "High"))) ||
(ISPICKVAL (Status, "Closed")) ||
(IsClosedOnCreate=True))
Code: IsEscalated=True && NOT(ISPICKVAL(Priority,"High"))
I don't know if it is actually checking if the case is closed or not. I originally placed ISPICKVAL (Status,"Closed") in it and was running into the IsEscalated problem. I started from scratch and the top worked.
Thank you for those that put in their insight, I like seeing the full code that other people put it and had success with. I greatly appreciate @Nitesh 's response.
OR(
AND (ISPICKVAL(Status, "Escalated"), IsClosed, IsClosedOnCreate) , NOT(ISPICKVAL( Priority, "High")))
The validation rule does not appear to be working correctly. Marking IsEscalated to true and Priority to Medium did not fire the validation rule.
ISPICKVAL(Status, "Closed"),
ISPICKVAL(Priority, "Low"),
ISPICKVAL(Priority, "Medium")),
null)
AND(
IsEscalated=TRUE,
OR(
NOT(IsPICKVAL(Priority, "High")),
ISPICKVAL(Status,"Closed"),
IsClosedOnCreate=True
))
and
(IsEscalated ,
or
(ISPICKVAL(Status, "Closed"),
not(ISPICKVAL(Priority, "High"))
)
)
IsClosedOnCreate is not being checked by the Test
AND(
IsEscalated,
OR(
ISPICKVAL(Status, "Closed"),
IsClosedOnCreate,
NOT(ISPICKVAL(Priority, "High"))
)
)
I still don't understand why this dosn't satisfy the demands of the challenge.
(ISPICKVAL(Status, "Escalated")) &&
(BEGINS(TEXT(PRIORVALUE(Status)), "Closed") ||
ISPICKVAL(Priority, "Low") ||
ISPICKVAL(Priority, "Medium") ||
(IsEscalated = TRUE))
Any feedback or discussion would be greatly appreciated.
AND(
IsEscalated,
OR(
BEGINS(TEXT(PRIORVALUE(Status)), "Closed"),
NOT(ISPICKVAL(Priority,"High"))
)
)
If you write the validation in this way, it will pass.
What's misleading is the Error message, which states: The error message implies that the logic should be, "only allow a case to be escalated if is it high priority and not closed".
IsEscalated = TRUE &&
ISPICKVAL(Status, "Closed") ||
IsClosedOnCreate = TRUE ||
NOT(ISPICKVAL( Priority , "High" ))
Thanks
PS: If my answer helps you to solve your problem please mark it as best answer. It will help other trailbalzers too.