function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
krishna chaitanya 35krishna chaitanya 35 

Create a validation rule for escalated cases.

The validation rule should be on the Case object.
The validation rule should be named 'Mark_as_Escalated'.
The validation rule should fire if someone tries to set a case as escalated and it is closed, closed when created, or does not have a priority of High.
The validation rule should display the error message 'You can only set a case as escalated if it is high priority and not closed' under the Escalated field when triggered.
Add the 'Escalated' field to the Case page layout.
Best Answer chosen by krishna chaitanya 35
Nida Khan 5Nida Khan 5

Hello All,
I successfully completed this challenge:

IF( IsEscalated , OR(IsClosedOnCreate , 
ISPICKVAL(Status, "Closed"), 
ISPICKVAL(Priority, "Low"), 
ISPICKVAL(Priority, "Medium")), 
null)

Thanks,
Nida

 

All Answers

James LoghryJames Loghry
Hi Krishna,

It looks like you're trying to get someone to solve a Trailhead challenge for you.  Instead, try re-reading and following the instructions that are part of the Trailhead challenge. If you run into any errors and have trouble solving the errors, then feel free to come back and ask for help.

Thank you.
erin ryan 8erin ryan 8
I'm having the same struggle. What am I doing wrong? Thanks
(ISPICKVAL( Status , " IsEscalated ") && 
(ISPICKVAL(PRIORVALUE( Status ), "Closed") && 
(ISPICKVAL( Priority , "High"))))
James LoghryJames Loghry
Erin:
  1. You want to use the "IsEscalated" field instead of a Status of "IsEscalated"
  2. You dont need PRIORVALUE in your function at all.
  3. The formula should check that the Case  (IS ESCALALTED AND (The case IsClosedOnCreate OR the Priority is *NOT* High OR the Status is Closed
Granted step 3 is full of hints, so it's up to you to put that in a formula form.  Keep in mind that this is an ADVANCED formula challenge.
erin ryan 8erin ryan 8
Thanks anyway , but I'm just not getting this rule. Most of the time  I learn by seeing what works and  evaluating why it works. Trailhead should have a capitulation button. I'd be willing to forfeit the points and get back to work. 
Liss Formentin 8Liss Formentin 8

James- appreciate the response on this thread. I'm getting a little hung up on this one and hoping for some guidance. Any pointers?

CASE  (IsEscalated,
 (AND
  (OR
    (IsClosedOnCreate,
     IsClosed,
     ISPICKVAL(Priority, "Low"),
     ISPICKVAL(Priority, "Medium"))
  )
 )
)

Error: Incorrect number of parameters for function 'CASE()'. Expected 2, received 2

Nida Khan 5Nida Khan 5

Hello All,
I successfully completed this challenge:

IF( IsEscalated , OR(IsClosedOnCreate , 
ISPICKVAL(Status, "Closed"), 
ISPICKVAL(Priority, "Low"), 
ISPICKVAL(Priority, "Medium")), 
null)

Thanks,
Nida

 

This was selected as the best answer
Chalice Nead 3Chalice Nead 3
This one took some thought! This is the simplest method I came up with- following James' not-so-subtle hinting.

IF(IsEscalated, AND(IsClosedOnCreate, 
     TEXT(Priority)!= "High",
     ISPICKVAL(Status, "Closed")),
     null)
 
Jens Vanden MeersschautJens Vanden Meersschaut
This is what I came up with. 
 
IF(
     IsEscalated, 
     OR(
            BEGINS(TEXT(Status), "Closed"), 
            NOT(ISPICKVAL (Priority, "High"))
           ), 
     null 
    )

 
Darrell GallegosDarrell Gallegos
Question. After completing this Module in the TrailHead; however, not I can not change the status from Escalated not close the case. What are I missing? Thanks.
ashley brownashley brown
Heres what we got and it worked

IF( IsEscalated , OR(IsClosedOnCreate ,
ISPICKVAL(Status, "Closed"),
NOT ISPICKVAL(Priority, "High")),
null)
Andreas GerogiannisAndreas Gerogiannis
BTW This one works too

AND(
  IsEscalated,
  OR( 
    ISPICKVAL( Status , 'closed'),
    IsClosedOnCreate,
    !(ISPICKVAL( Priority , 'High'))
  )
)
Niyanthri Lokesh 2Niyanthri Lokesh 2
This one worked for me
ISPICKVAL(Status, "Closed")|| 
NOT( ISPICKVAL( Priority , "High") )&& 
IsEscalated
Kris RyanKris Ryan
This one worked for me:

and(IsEscalated,
  or(IsClosed,
      and(IsClosedOnCreate),
      TEXT(Priority)<>"High"))
sangeethsangeeth
Hi, 
This one is a direct translation of the requirement and worked too..

NOT( ISPICKVAL( Priority , "High") ) ||
ISPICKVAL(Status, "Closed") 
&& 
 IsClosedOnCreate
chinochino
this also worked.

( ISPICKVAL( Status , "escalated") && IsClosedOnCreate ) 
|| 
NOT( ISPICKVAL( Priority , "High") )
Abhishek Mishra 92Abhishek Mishra 92
IF( IsEscalated = true, ( 
                                      IF(ISPICKVAL( Status, "Closed") , true, false) || 
                                      IF(NOT(ISPICKVAL( Priority , "High")) , true, false) || 
                                      IF(IsClosedOnCreate, true, false)), 
false)
Pavlo ShchurPavlo Shchur
Hi, this is an another option.
IsEscalated = true && ISPICKVAL( Status, "Closed")
||
NOT(ISPICKVAL(Priority , "High"))
||
IsClosedOnCreate
Daryle SinghDaryle Singh
IF
(
IsEscalated=true,

OR(IsClosed ,IsClosedOnCreate,NOT ISPICKVAL(Priority , 'High')),

null
)

is the solution


This reads as: 
If the record is to be escalated (IsEscalated=true) then check the following OR statement.

The OR statement will return true 
if IsClosed=true or if IsClosedOnCreate = true or
if ISPICKVAL(Priority , 'High') evaluates to false.

It will evaluate to false if Priority is not equal to 'High'
then u negate it to make it true.
So its true that Priority is not equal to 'High'

If the OR statement evaluates to true then it will fire the validation rule which will then display the error message.
 
Carmen Nixon 5Carmen Nixon 5
IsEscalated=True &&
NOT (ISPICKVAL (Priority,"High"))&&
NOT(ISPICKVAL(Status, "Closed"))
sachin saini 26sachin saini 26
The validation rule name 'Mark_as_Escalated' was not found.

What to do.??
Andrei MilitaruAndrei Militaru
@Sachin, are you creating the validation rule directly from the default Escalated field on the Case Object? ( Setup -> Object Manager -> Case -> Fields & Relationships -> Escalated -> Hit NEW under Validation Rules )  If you are, pay attention to the name, you might be missing something.
Vikash Kumar MandalVikash Kumar Mandal
Hello all 
I completed this challenge
IsEscalated = TRUE && (IsClosedOnCreate ||ISPICKVAL( Status ," Closed")  || NOT(ISPICKVAL(Priority,"High")))
try it.
Pankaj ShakyaPankaj Shakya
IF(
ISPICKVAL(Status, "Escalated"),  
OR(IsClosedOnCreate,  IsClosed ),
OR(
      ISPICKVAL( Priority, "Medium" ),
      ISPICKVAL( Priority, "LOW" )
      )
)
SIVANANDAN PSIVANANDAN P
IF( IsEscalated , AND( NOT(IsClosed) , NOT( ISPICKVAL(Priority, 'High'))),false)
This one worked for me well
 
Armando Psalms AzurinArmando Psalms Azurin
This one worked for me:
(IsEscalated && IsClosed) || (IsClosed && CreatedDate = DATETIMEVALUE(TODAY())) || NOT( ISPICKVAL(Priority, "High"))
Rizwan Ali 8Rizwan Ali 8
This is work for me:

AND(
   IsEscalated=TRUE,

OR(
   NOT(IsPICKVAL(Priority, "High")),
   ISPICKVAL(Status,"Closed"),
   IsClosedOnCreate=True
))
Pedro RodriguesPedro Rodrigues
I used:

IF (
  IsEscalated = true , AND (
    !(IsClosed) , !(ISPICKVAL(Priority, 'High'))
  ) ,false
)
David GranadosDavid Granados
I keep getting this error message:
Error: Field IsEscalated does not exist. Check spelling.

Help! :)
Sebastian Diaz 5Sebastian Diaz 5
Hey guys!
The issue here is realated to the fact that the isntructions are not clear enough.

Meaning: 

The error message you are supossed to show, specifically states: "You can only set a case as escalated if it is high priority AND not closed"
This lead to an error as you assume that both things must happen for the rule to work.

Now, if you look to the prior statement: "The validation rule should fire if someone tries to set a case as escalated and it is closed, closed when created, OR does not have a priority of High."

So, on my first try, I ended up following the message statement, with:

IsEscalated &&
BEGINS(TEXT(Status),"Closed") &&
NOT(ISPICKVAL(Priority, "High"))

And based on the confusion, I tried changing the logic to OR, and puffff! working.

IsEscalated &&
BEGINS(TEXT(Status),"Closed") ||
NOT(ISPICKVAL(Priority, "High"))
Bee_2018Bee_2018
This one works for me : 

AND( IsEscalated , OR( IsClosed ,  IsClosedOnCreate , NOT(ISPICKVAL( Priority ,"High")))
)

 
Bharath Kumar 305Bharath Kumar 305
And this one worked for me :-)
AND(IsEscalated = True,IsClosed = False,NOT(ISPICKVAL(Priority, "High")))
Krishna ShahiKrishna Shahi
Easiest explaination
This worked for me

IF(
    NOT(IsClosed) && NOT(ISPICKVAL(Priority,"high")),
    true ,
    false)
Dharmavaram SaikumarDharmavaram Saikumar
I tried this and completed the challenge.

IF(AND( IsEscalated =True, IsClosed = True),
IsClosedOnCreate =True,NOT( ISPICKVAL( Priority , "High") ))

Please Let me know if the above validation rule is made your challenge to be completed.
Thank you!
Patricia Almeida dos SantosPatricia Almeida dos Santos
This is how I completed the challenge.  I hope this helps :)  

IF( ISPICKVAL( Status, "Escalated") , 
     OR( IsClosed , IsClosedOnCreate ),  
     NOT(ISPICKVAL( Priority, "High")) 
 )

Cheers,
Patricia
Rucha MM 9Rucha MM 9
IF( IsEscalated , IsClosed   || ISPICKVAL( Status ,"Closed")   ||   NOT(ISPICKVAL( Priority , "High"))   , null)
Shilpa D 5Shilpa D 5
Simplest form that worked by breaking down the cases as follows:

IF( IsEscalated ,  // this checks for the escalation and this field is created by us
  OR(ISPICKVAL( Status , 'Closed'),  //prior status shouldn't be Closed if we are trying to escalate - we cannot escalate the closed cases
     ISPICKVAL( Priority , 'Low'), // we dont want the Low or Medium priority cases to be escalated
     ISPICKVAL( Priority , 'Medium'), // we are only interested in escalating the High priority cases
     IsClosedOnCreate  // This field is already existing in the system
  ), null 
)
Anshul HedauAnshul Hedau
This worked for me perfectly:
IF( IsEscalated , OR( IsClosed , IsClosedOnCreate , NOT( ISPICKVAL( Priority , "High" ) ) ) , null )
Swetha SaduSwetha Sadu
I tried this way and finished this challenge successfully. Hope it helps anyone.

Isblank ('escalated') = False && Text(Status) = 'Closed' ||
Text(Priority) <> 'High' ||
IsClosedOnCreate = True
Debashish NathDebashish Nath
this is what I came up with... I was confused with the last OR condition but the correct one is #2 

#1 - note that last or condition, cannot set status to Escalated if Priority is not High, but this failed the tests
AND
(ISPICKVAL(Status, "Escalated"),  
IsClosed 
)
|| (AND
   (ISPICKVAL(Status, "Escalated"),   
   IsClosedOnCreate )
   )
|| (AND 
   (ISPICKVAL(Status, "Escalated"), 
   (!(text(Priority)  = "High")))
   )
 
#2 - this is the correct one
AND
(ISPICKVAL(Status, "Escalated"),  
IsClosed 
)
|| (AND
   (ISPICKVAL(Status, "Escalated"),   
   IsClosedOnCreate )
   )
|| (!(text(Priority)  = "High"))
 
Kruno Zegarra 6Kruno Zegarra 6
Here's an alternate way =)

(IsEscalated)&&
(IsClosedOnCreate) ||
NOT(ISPICKVAL(Priority, "High")) ||
(ISPICKVAL(Status, "Closed"))
Kanakaiah Challa 4Kanakaiah Challa 4
one of other ways to solve 

(ISPICKVAL(Status, "escalated") &&  ISPICKVAL(PRIORVALUE( Status ), "Closed")) ||  NOT( ISPICKVAL(Priority, "High"))
 
Sanwali Mahajan 9Sanwali Mahajan 9
ISPICKVAL(Status,"Escalated") &&
ISPICKVAL(Status,"Closed") &&
ISPICKVAL(Status,"Closed When Created")
|| NOT(ISPICKVAL(Priority,"High"))
SAI MAHESH KOTHAGULLASAI MAHESH KOTHAGULLA
Its working for me:

IF( IsEscalated ,
        IF(NOT(ISPICKVAL(Status,"Closed")) && ISPICKVAL(Priority, "High"),
                false,true),
        false

)
srihari koyilasrihari koyila
can any one help me,,

Create a Validation Rule That Uses Picklist Values
Create a validation rule that allows a user to escalate a case only when it meets certain requirements.
Create a validation rule:
Object: Case
Name: Mark_as_Escalated
Make the validation rule fire when someone tries to escalate a case and one or more of these conditions exist:
The case status is "Closed"
Priority is not High
Error Message: You can only set a case as escalated if it is high priority and not closed (we won't check this)
Error Location: Under the Escalated field (we won't check this)
Add the Escalated field to the Case Layout page layout

We tried to escalate a high priority case but couldn’t save the record. Check the logic in your validation rule’s formula.
Raiane GuedesRaiane Guedes

got it, you have to go to Case Page Layouts > Case Layout > drag Escalete and save
Kaique MathiasKaique Mathias
Validation rule: AND(IsEscalated,OR(ISPICKVAL(Status,'Closed'),NOT(ISPICKVAL(Priority,'High'))))

Page layout:  Case Page Layouts > Case Layout > drag Escalete and save or quick save
George MelnicGeorge Melnic

Ended up with the same one liner as Mathias: 

AND(IsEscalated, OR(ISPICKVAL(Status, "Closed"), NOT(ISPICKVAL(Priority, "High"))))
suresh boddu 17suresh boddu 17
Validation rule: ISPICKVAL( Status , "Closed") || NOT(ISPICKVAL( Priority , "High") )

Page layout:  Case Page Layouts > Case Layout > drag Escalete and save or quick save
Shubham LoyaShubham Loya
Why to make a simple question this complicated....

I just wrote a simple Validation Formula and passed the challenge:
ISPICKVAL( Status ,  "Closed")  ||  (ISPICKVAL( Priority , "Medium")  ||  ISPICKVAL( Priority , "Low") )

And for Page layout navigate to: Case Page Layouts > Case Layout, then drag Escalete and save(as shown in attached picture)
User-added image
Jiwesh ChauhanJiwesh Chauhan
Formula:- 
IsEscalated  && ( NOT(ISPICKVAL(Priority, 'High')) || BEGINS(TEXT(Status),'Closed'))

User-added image
Ulrich LontsiUlrich Lontsi

I just wrote a simple Validation Formula and passed the challenge:

NOT(AND(IsEscalated,
    NOT(ISPICKVAL(Status, "Closed")),
    ISPICKVAL(Priority,"High" )))

User-added image