-2

I'm trying to write the validation rule that follow this condition.

Date_CheckIn__c should not be empty and Status <> In Progress or Closed

AND(
NOT(ISBLANK( Date_CheckIn__c )),
OR(
ISPICKVAL( Status__c , "In Progress"),
ISPICKVAL( Status__c , "Closed")
),
)

The above formula error out:

Error: Syntax error. Found ')'

2 Answers 2

0

@Nick Kahn Please check the below formula, you have added an extra ',' after ')' ISPICKVAL( Status__c , "Closed"))

AND(
NOT(ISBLANK( Date_CheckIn__c )),
OR(
ISPICKVAL( Status__c , "In Progress"),
ISPICKVAL( Status__c , "Closed")
))
3
  • Error is gone but the logic does not work and yes my validation is active
    – Nick
    May 20, 2021 at 13:11
  • @NickKahn Can you check now? AND( NOT(ISBLANK( Date_CheckIn__c )), OR( NOT(ISPICKVAL( Status__c , "In Progress"), NOT(ISPICKVAL( Status__c , "Closed") ))
    – Ravi Teja
    May 20, 2021 at 13:33
  • still does not work, it does not fire the validation rule so the logic should be Date_CheckIn__c should not be empty and Status CANNOT be "In Progress" or "Closed"
    – Nick
    May 20, 2021 at 13:52
2

You have an extra comma at the end of you formula. After the second to last parenthesis.

2
  • Error is gone but the logic does not work and yes my validation is active
    – Nick
    May 20, 2021 at 13:10
  • From reading your message, it looks like you want ISBLANK( Date_CheckIn__c ) instead of NOT(ISBLANK( Date_CheckIn__c )). May 20, 2021 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .