0

I am trying to find the lessor of two date fields, then comparing that "lessor" date field to another date field to trigger a checkbox on/off.

Here is the current formula, however, im trying to figure out how to find the lessor of the two date fields (Actual_Shipment_Date__c and Fulfillment_Date__c) before comparing it to Scheduled_Ship_Date__c in the second nested OR statement.

IF(
  OR(
    AND(TODAY() > Scheduled_Ship_Date__c, (Line_Status__c = "OPEN")),
    AND(
      OR(
        Actual_Shipment_Date__c > Scheduled_Ship_Date__c,
        Fulfillment_Date__c > Scheduled_Ship_Date__c
      ),
      (Line_Status__c = "CLOSED")
    )
  ),
  True,
  False
)
10
  • 2
    You can always reduce IF(condition, true, false) to simply condition.
    – Adrian Larson
    Commented Dec 10, 2019 at 21:24
  • @AdrianLarson If I reduce it to just a condition and not IF condition, how would that work for both of my OPEN and CLOSED scenarios? In other words, can I have multiple conditions for a single checkbox without nesting them in an IF condition? Something to consider, this is for all for one checkbox formula.
    – PowerUp
    Commented Dec 10, 2019 at 21:30
  • The output of your OR is either true or false, and then your IF just outputs exactly the same value. Conversely, if you had IF(condition, false, true), you would simply use NOT(condition).
    – Adrian Larson
    Commented Dec 10, 2019 at 21:36
  • 1
    How is this different from your previous question?
    – Derek F
    Commented Dec 10, 2019 at 21:37
  • @DerekF Good point...hehe. Can this be merged?
    – PowerUp
    Commented Dec 10, 2019 at 21:41

0

You must log in to answer this question.

Browse other questions tagged .