Formula help - Answers - Salesforce Trailblazer Community
Ask Search:
Lisa SouletLisa Soulet 

Formula help

Trying to write this formula and getting an error that I am missing a closed brace:

AND (
(NOT (
ISBLANK(
[Shift_Report__c].End_Time__c))).
[Shift_Report__c].Shift_Report_Closed_yn__c=FALSE )

I think I may have an extra set of braces around the "NOT" clause, but not sure.  What have I written incorrectly?
Best Answer chosen by Lisa Soulet
Deepak AnandDeepak Anand
Here is how you should learn it - "Divide and Conquer"

1. NOT(ISBLANK([Shift_Report__c].End_Time__c))

2. [Shift_Report__c].Shift_Report_Closed_yn__c = FALSE

Then combine in an AND - 

AND(
    [1],
    [2]
)

That yields = 
 
AND(
    NOT(ISBLANK([Shift_Report__c].End_Time__c)),
    [Shift_Report__c].Shift_Report_Closed_yn__c = FALSE
)

All Answers

Deepak AnandDeepak Anand
Here is how you should learn it - "Divide and Conquer"

1. NOT(ISBLANK([Shift_Report__c].End_Time__c))

2. [Shift_Report__c].Shift_Report_Closed_yn__c = FALSE

Then combine in an AND - 

AND(
    [1],
    [2]
)

That yields = 
 
AND(
    NOT(ISBLANK([Shift_Report__c].End_Time__c)),
    [Shift_Report__c].Shift_Report_Closed_yn__c = FALSE
)
This was selected as the best answer
Lisa SouletLisa Soulet
Thank you for the teaching moment - I just learned something super handy which will help me in the future.  THANKS!